Rust
Rust
Frame.io - Get Team ID
See more Frame.io Examples
Get your team ID.Chilkat Rust Downloads
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = chilkat::Http::new();
// Implements the following CURL command:
// curl \
// -H "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" \
// https://api.frame.io/v2/accounts/<ACCOUNT_ID>/teams
// Use the following online tool to generate HTTP code from a CURL command
// Convert a cURL Command to HTTP Source Code
// Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header.
http.set_auth_token("<FRAME_IO_DEV_TOKEN>");
let _ = http.set_url_var("account_id", "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455");
let sb_response_body = chilkat::StringBuilder::new();
if http.quick_get_sb("https://api.frame.io/v2/accounts/{$account_id}/teams", &sb_response_body).is_err() {
println!("{}", http.last_error_text());
return;
}
let j_resp = chilkat::JsonObject::new();
let _ = j_resp.load_sb(&sb_response_body);
j_resp.set_emit_compact(false);
println!("Response Body:");
println!("{}", j_resp.emit().unwrap_or_default());
let resp_status_code = http.last_status();
println!("Response Status Code = {}", resp_status_code);
if resp_status_code >= 400 {
println!("Response Header:");
println!("{}", http.last_header());
println!("Failed.");
return;
}
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "image_64": null,
// "project_count": 1,
// "default_color": "5B53FF",
// "deleted_at": null,
// "image_256": null,
// "background_color": null,
// "session_watermark_templates": [
// ],
// "font_color": null,
// "email_branding": {
// "_type": "email_branding",
// "accent_color": null,
// "background_color": null,
// "default_accent_color": "5B53FF",
// "default_background_color": "F7F8FA",
// "id": "71cddf30-cdd6-4db9-9f1f-f119c3a6c36d",
// "image": null,
// "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/email_branding/71c...508199e26038"
// },
// "bio": null,
// "updated_at": "2020-08-18T02:20:14.432078Z",
// "link": null,
// "default_font_color": "20222B",
// "image_128": null,
// "dark_theme": false,
// "disable_sbwm_internally": false,
// "account_id": "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455",
// "name": "Chilkat's Team",
// "location": null,
// "solo": false,
// "watermark": null,
// "file_count": 0,
// "duration": 0,
// "image_32": null,
// "team_image": null,
// "default_background_color": "FFFFFF",
// "resource_id": "8e32b1ae-86db-4164-83b1-81b37b2e7499",
// "color": null,
// "frames": 0,
// "storage": 0,
// "collaborator_count": 1,
// "creator_id": "34b4f98a-7cc9-4159-8f46-c7c3d837fc6f",
// "default_session_watermark_template_id": null,
// "archived_storage": 0,
// "slack_webhook": null,
// "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/teams/95a5fb..a86b2663",
// "member_count": 1,
// "_type": "team",
// "asset_lifecycle_policy": null,
// "member_limit": null,
// "id": "95a5fbad-688d-46fc-aef1-2f011dd76c10",
// "storage_limit": null,
// "access": "private",
// "inserted_at": "2020-08-18T02:20:13.171582Z",
// "folder_count": 0
// }
// Sample code for parsing the JSON response...
// Use the following online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON
let image_64 = j_resp.string_of("image_64").unwrap_or_default();
let project_count = j_resp.int_of("project_count");
let default_color = j_resp.string_of("default_color").unwrap_or_default();
let deleted_at = j_resp.string_of("deleted_at").unwrap_or_default();
let image_256 = j_resp.string_of("image_256").unwrap_or_default();
let background_color = j_resp.string_of("background_color").unwrap_or_default();
let font_color = j_resp.string_of("font_color").unwrap_or_default();
let email_branding_type = j_resp.string_of("email_branding._type").unwrap_or_default();
let email_branding_accent_color = j_resp.string_of("email_branding.accent_color").unwrap_or_default();
let email_branding_background_color = j_resp.string_of("email_branding.background_color").unwrap_or_default();
let email_branding_default_accent_color = j_resp.string_of("email_branding.default_accent_color").unwrap_or_default();
let email_branding_default_background_color = j_resp.string_of("email_branding.default_background_color").unwrap_or_default();
let email_branding_id = j_resp.string_of("email_branding.id").unwrap_or_default();
let email_branding_image = j_resp.string_of("email_branding.image").unwrap_or_default();
let email_branding_upload_url = j_resp.string_of("email_branding.upload_url").unwrap_or_default();
let bio = j_resp.string_of("bio").unwrap_or_default();
let updated_at = j_resp.string_of("updated_at").unwrap_or_default();
let link = j_resp.string_of("link").unwrap_or_default();
let default_font_color = j_resp.string_of("default_font_color").unwrap_or_default();
let image_128 = j_resp.string_of("image_128").unwrap_or_default();
let dark_theme = j_resp.bool_of("dark_theme");
let disable_sbwm_internally = j_resp.bool_of("disable_sbwm_internally");
let account_id = j_resp.string_of("account_id").unwrap_or_default();
let name = j_resp.string_of("name").unwrap_or_default();
let location = j_resp.string_of("location").unwrap_or_default();
let solo = j_resp.bool_of("solo");
let watermark = j_resp.string_of("watermark").unwrap_or_default();
let file_count = j_resp.int_of("file_count");
let duration = j_resp.int_of("duration");
let image_32 = j_resp.string_of("image_32").unwrap_or_default();
let team_image = j_resp.string_of("team_image").unwrap_or_default();
let default_background_color = j_resp.string_of("default_background_color").unwrap_or_default();
let resource_id = j_resp.string_of("resource_id").unwrap_or_default();
let color = j_resp.string_of("color").unwrap_or_default();
let frames = j_resp.int_of("frames");
let storage = j_resp.int_of("storage");
let collaborator_count = j_resp.int_of("collaborator_count");
let creator_id = j_resp.string_of("creator_id").unwrap_or_default();
let default_session_watermark_template_id = j_resp.string_of("default_session_watermark_template_id").unwrap_or_default();
let archived_storage = j_resp.int_of("archived_storage");
let slack_webhook = j_resp.string_of("slack_webhook").unwrap_or_default();
let upload_url = j_resp.string_of("upload_url").unwrap_or_default();
let member_count = j_resp.int_of("member_count");
let v_type = j_resp.string_of("_type").unwrap_or_default();
let asset_lifecycle_policy = j_resp.string_of("asset_lifecycle_policy").unwrap_or_default();
let member_limit = j_resp.string_of("member_limit").unwrap_or_default();
let id = j_resp.string_of("id").unwrap_or_default();
let storage_limit = j_resp.string_of("storage_limit").unwrap_or_default();
let access = j_resp.string_of("access").unwrap_or_default();
let inserted_at = j_resp.string_of("inserted_at").unwrap_or_default();
let folder_count = j_resp.int_of("folder_count");