Unicode C++
Unicode C++
Frame.io - Get Team ID
See more Frame.io Examples
Get your team ID.Chilkat Unicode C++ Downloads
#include <CkHttpW.h>
#include <CkStringBuilderW.h>
#include <CkJsonObjectW.h>
void ChilkatSample(void)
{
bool success = false;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttpW http;
// 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.put_AuthToken(L"<FRAME_IO_DEV_TOKEN>");
http.SetUrlVar(L"account_id",L"b1cd046b-a3bf-4ef8-81a6-0afd74ecc455");
CkStringBuilderW sbResponseBody;
success = http.QuickGetSb(L"https://api.frame.io/v2/accounts/{$account_id}/teams",sbResponseBody);
if (success == false) {
wprintf(L"%s\n",http.lastErrorText());
return;
}
CkJsonObjectW jResp;
jResp.LoadSb(sbResponseBody);
jResp.put_EmitCompact(false);
wprintf(L"Response Body:\n");
wprintf(L"%s\n",jResp.emit());
int respStatusCode = http.get_LastStatus();
wprintf(L"Response Status Code = %d\n",respStatusCode);
if (respStatusCode >= 400) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",http.lastHeader());
wprintf(L"Failed.\n");
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
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
const wchar_t *image_64 = jResp.stringOf(L"image_64");
int project_count = jResp.IntOf(L"project_count");
const wchar_t *default_color = jResp.stringOf(L"default_color");
const wchar_t *deleted_at = jResp.stringOf(L"deleted_at");
const wchar_t *image_256 = jResp.stringOf(L"image_256");
const wchar_t *background_color = jResp.stringOf(L"background_color");
const wchar_t *font_color = jResp.stringOf(L"font_color");
const wchar_t *email_branding_type = jResp.stringOf(L"email_branding._type");
const wchar_t *email_brandingAccent_color = jResp.stringOf(L"email_branding.accent_color");
const wchar_t *email_brandingBackground_color = jResp.stringOf(L"email_branding.background_color");
const wchar_t *email_brandingDefault_accent_color = jResp.stringOf(L"email_branding.default_accent_color");
const wchar_t *email_brandingDefault_background_color = jResp.stringOf(L"email_branding.default_background_color");
const wchar_t *email_brandingId = jResp.stringOf(L"email_branding.id");
const wchar_t *email_brandingImage = jResp.stringOf(L"email_branding.image");
const wchar_t *email_brandingUpload_url = jResp.stringOf(L"email_branding.upload_url");
const wchar_t *bio = jResp.stringOf(L"bio");
const wchar_t *updated_at = jResp.stringOf(L"updated_at");
const wchar_t *link = jResp.stringOf(L"link");
const wchar_t *default_font_color = jResp.stringOf(L"default_font_color");
const wchar_t *image_128 = jResp.stringOf(L"image_128");
bool dark_theme = jResp.BoolOf(L"dark_theme");
bool disable_sbwm_internally = jResp.BoolOf(L"disable_sbwm_internally");
const wchar_t *account_id = jResp.stringOf(L"account_id");
const wchar_t *name = jResp.stringOf(L"name");
const wchar_t *location = jResp.stringOf(L"location");
bool solo = jResp.BoolOf(L"solo");
const wchar_t *watermark = jResp.stringOf(L"watermark");
int file_count = jResp.IntOf(L"file_count");
int duration = jResp.IntOf(L"duration");
const wchar_t *image_32 = jResp.stringOf(L"image_32");
const wchar_t *team_image = jResp.stringOf(L"team_image");
const wchar_t *default_background_color = jResp.stringOf(L"default_background_color");
const wchar_t *resource_id = jResp.stringOf(L"resource_id");
const wchar_t *color = jResp.stringOf(L"color");
int frames = jResp.IntOf(L"frames");
int storage = jResp.IntOf(L"storage");
int collaborator_count = jResp.IntOf(L"collaborator_count");
const wchar_t *creator_id = jResp.stringOf(L"creator_id");
const wchar_t *default_session_watermark_template_id = jResp.stringOf(L"default_session_watermark_template_id");
int archived_storage = jResp.IntOf(L"archived_storage");
const wchar_t *slack_webhook = jResp.stringOf(L"slack_webhook");
const wchar_t *upload_url = jResp.stringOf(L"upload_url");
int member_count = jResp.IntOf(L"member_count");
const wchar_t *v_type = jResp.stringOf(L"_type");
const wchar_t *asset_lifecycle_policy = jResp.stringOf(L"asset_lifecycle_policy");
const wchar_t *member_limit = jResp.stringOf(L"member_limit");
const wchar_t *id = jResp.stringOf(L"id");
const wchar_t *storage_limit = jResp.stringOf(L"storage_limit");
const wchar_t *access = jResp.stringOf(L"access");
const wchar_t *inserted_at = jResp.stringOf(L"inserted_at");
int folder_count = jResp.IntOf(L"folder_count");
}