~goorzhel/sota-slack-spotter

6b06bc44eaa414a4f6301a2fee4fbdc0fa41ec3f — Antonio Gurgel a month ago 82cbd30
Add users.json

I'd been using the full user list for tests, gitignored for privacy
reasons, but since I'm only testing spots with me in them I might as
well pare the list down and start shipping it.

This'll also allow people without access to my club's Slack to run
`cargo test`.
3 files changed, 58 insertions(+), 2 deletions(-)

M .gitignore
M src/test.rs
A src/test/users.json
M .gitignore => .gitignore +0 -1
@@ 1,3 1,2 @@
/target
.env
**/users.json

M src/test.rs => src/test.rs +0 -1
@@ 15,7 15,6 @@ fn spot() -> String {
    include_str!("test/spot.json").to_string()
}

// $ curl https://slack.com/api/users.list -H "Authorization: Bearer $SLACK_BOT_TOKEN" > test/users.json
fn slack_users() -> Vec<User> {
    serde_json::from_str::<ListResponse>(include_str!("test/users.json"))
        .unwrap()

A src/test/users.json => src/test/users.json +58 -0
@@ 0,0 1,58 @@
{
    "ok": true,
    "members": [
        {
            "id": "U01AAAAAAAA",
            "team_id": "T0000000",
            "name": "n6tno",
            "deleted": false,
            "color": "000000",
            "real_name": "Antonio N6TNO",
            "tz": "America\/Los_Angeles",
            "tz_label": "Pacific Daylight Time",
            "tz_offset": -25200,
            "profile": {
                "title": "General @ CM87",
                "phone": "",
                "skype": "",
                "real_name": "Antonio N6TNO",
                "real_name_normalized": "Antonio N6TNO",
                "display_name": "Antonio N6TNO",
                "display_name_normalized": "Antonio N6TNO",
                "fields": null,
                "status_text": "",
                "status_emoji": "",
                "status_emoji_display_info": [],
                "status_expiration": 0,
                "avatar_hash": "d212f18d14e5",
                "image_original": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_original.jpg",
                "is_custom_image": true,
                "first_name": "Antonio",
                "last_name": "N6TNO",
                "image_24": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_24.jpg",
                "image_32": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_32.jpg",
                "image_48": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_48.jpg",
                "image_72": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_72.jpg",
                "image_192": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_192.jpg",
                "image_512": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_512.jpg",
                "image_1024": "https:\/\/avatars.slack-edge.com\/2022-01-17\/2968113918836_d212f18d14e50d9e0d94_1024.jpg",
                "status_text_canonical": "",
                "team": "T0000000"
            },
            "is_admin": false,
            "is_owner": false,
            "is_primary_owner": false,
            "is_restricted": false,
            "is_ultra_restricted": false,
            "is_bot": false,
            "is_app_user": false,
            "updated": 1652049771,
            "is_email_confirmed": true,
            "who_can_share_contact_card": "EVERYONE"
        }
    ],
    "cache_ts": 1652553312,
    "response_metadata": {
        "next_cursor": ""
    }
}
\ No newline at end of file