Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(MFC) Frame.io - Get Team IDGet your team ID. For more information, see https://docs.frame.io/docs/root-asset-ids
#include <CkHttp.h> #include <CkStringBuilder.h> #include <CkJsonObject.h> void ChilkatSample(void) { CkString strOut; // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. CkHttp http; bool success; // 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("<FRAME_IO_DEV_TOKEN>"); http.SetUrlVar("account_id","b1cd046b-a3bf-4ef8-81a6-0afd74ecc455"); CkStringBuilder sbResponseBody; success = http.QuickGetSb("https://api.frame.io/v2/accounts/{$account_id}/teams",sbResponseBody); if (success == false) { strOut.append(http.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } CkJsonObject jResp; jResp.LoadSb(sbResponseBody); jResp.put_EmitCompact(false); strOut.append("Response Body:"); strOut.append("\r\n"); strOut.append(jResp.emit()); strOut.append("\r\n"); int respStatusCode = http.get_LastStatus(); strOut.append("Response Status Code = "); strOut.appendInt(respStatusCode); strOut.append("\r\n"); if (respStatusCode >= 400) { strOut.append("Response Header:"); strOut.append("\r\n"); strOut.append(http.lastHeader()); strOut.append("\r\n"); strOut.append("Failed."); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); 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 char *image_64 = jResp.stringOf("image_64"); int project_count = jResp.IntOf("project_count"); const char *default_color = jResp.stringOf("default_color"); const char *deleted_at = jResp.stringOf("deleted_at"); const char *image_256 = jResp.stringOf("image_256"); const char *background_color = jResp.stringOf("background_color"); const char *font_color = jResp.stringOf("font_color"); const char *email_branding_type = jResp.stringOf("email_branding._type"); const char *email_brandingAccent_color = jResp.stringOf("email_branding.accent_color"); const char *email_brandingBackground_color = jResp.stringOf("email_branding.background_color"); const char *email_brandingDefault_accent_color = jResp.stringOf("email_branding.default_accent_color"); const char *email_brandingDefault_background_color = jResp.stringOf("email_branding.default_background_color"); const char *email_brandingId = jResp.stringOf("email_branding.id"); const char *email_brandingImage = jResp.stringOf("email_branding.image"); const char *email_brandingUpload_url = jResp.stringOf("email_branding.upload_url"); const char *bio = jResp.stringOf("bio"); const char *updated_at = jResp.stringOf("updated_at"); const char *link = jResp.stringOf("link"); const char *default_font_color = jResp.stringOf("default_font_color"); const char *image_128 = jResp.stringOf("image_128"); bool dark_theme = jResp.BoolOf("dark_theme"); bool disable_sbwm_internally = jResp.BoolOf("disable_sbwm_internally"); const char *account_id = jResp.stringOf("account_id"); const char *name = jResp.stringOf("name"); const char *location = jResp.stringOf("location"); bool solo = jResp.BoolOf("solo"); const char *watermark = jResp.stringOf("watermark"); int file_count = jResp.IntOf("file_count"); int duration = jResp.IntOf("duration"); const char *image_32 = jResp.stringOf("image_32"); const char *team_image = jResp.stringOf("team_image"); const char *default_background_color = jResp.stringOf("default_background_color"); const char *resource_id = jResp.stringOf("resource_id"); const char *color = jResp.stringOf("color"); int frames = jResp.IntOf("frames"); int storage = jResp.IntOf("storage"); int collaborator_count = jResp.IntOf("collaborator_count"); const char *creator_id = jResp.stringOf("creator_id"); const char *default_session_watermark_template_id = jResp.stringOf("default_session_watermark_template_id"); int archived_storage = jResp.IntOf("archived_storage"); const char *slack_webhook = jResp.stringOf("slack_webhook"); const char *upload_url = jResp.stringOf("upload_url"); int member_count = jResp.IntOf("member_count"); const char *v_type = jResp.stringOf("_type"); const char *asset_lifecycle_policy = jResp.stringOf("asset_lifecycle_policy"); const char *member_limit = jResp.stringOf("member_limit"); const char *id = jResp.stringOf("id"); const char *storage_limit = jResp.stringOf("storage_limit"); const char *access = jResp.stringOf("access"); const char *inserted_at = jResp.stringOf("inserted_at"); int folder_count = jResp.IntOf("folder_count"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } |
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.