Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Delphi ActiveX) Frame.io - Get Team IDGet your team ID. For more information, see https://docs.frame.io/docs/root-asset-ids
uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB; ... procedure TForm1.Button1Click(Sender: TObject); var http: TChilkatHttp; success: Integer; sbResponseBody: TChilkatStringBuilder; jResp: TChilkatJsonObject; respStatusCode: Integer; image_64: WideString; project_count: Integer; default_color: WideString; deleted_at: WideString; image_256: WideString; background_color: WideString; font_color: WideString; email_branding_type: WideString; email_brandingAccent_color: WideString; email_brandingBackground_color: WideString; email_brandingDefault_accent_color: WideString; email_brandingDefault_background_color: WideString; email_brandingId: WideString; email_brandingImage: WideString; email_brandingUpload_url: WideString; bio: WideString; updated_at: WideString; link: WideString; default_font_color: WideString; image_128: WideString; dark_theme: Integer; disable_sbwm_internally: Integer; account_id: WideString; name: WideString; location: WideString; solo: Integer; watermark: WideString; file_count: Integer; duration: Integer; image_32: WideString; team_image: WideString; default_background_color: WideString; resource_id: WideString; color: WideString; frames: Integer; storage: Integer; collaborator_count: Integer; creator_id: WideString; default_session_watermark_template_id: WideString; archived_storage: Integer; slack_webhook: WideString; upload_url: WideString; member_count: Integer; v_type: WideString; asset_lifecycle_policy: WideString; member_limit: WideString; id: WideString; storage_limit: WideString; access: WideString; inserted_at: WideString; folder_count: Integer; begin // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. http := TChilkatHttp.Create(Self); // 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.AuthToken := '<FRAME_IO_DEV_TOKEN>'; http.SetUrlVar('account_id','b1cd046b-a3bf-4ef8-81a6-0afd74ecc455'); sbResponseBody := TChilkatStringBuilder.Create(Self); success := http.QuickGetSb('https://api.frame.io/v2/accounts/{$account_id}/teams',sbResponseBody.ControlInterface); if (success = 0) then begin Memo1.Lines.Add(http.LastErrorText); Exit; end; jResp := TChilkatJsonObject.Create(Self); jResp.LoadSb(sbResponseBody.ControlInterface); jResp.EmitCompact := 0; Memo1.Lines.Add('Response Body:'); Memo1.Lines.Add(jResp.Emit()); respStatusCode := http.LastStatus; Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode)); if (respStatusCode >= 400) then begin Memo1.Lines.Add('Response Header:'); Memo1.Lines.Add(http.LastHeader); Memo1.Lines.Add('Failed.'); Exit; end; // 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 image_64 := jResp.StringOf('image_64'); project_count := jResp.IntOf('project_count'); default_color := jResp.StringOf('default_color'); deleted_at := jResp.StringOf('deleted_at'); image_256 := jResp.StringOf('image_256'); background_color := jResp.StringOf('background_color'); font_color := jResp.StringOf('font_color'); email_branding_type := jResp.StringOf('email_branding._type'); email_brandingAccent_color := jResp.StringOf('email_branding.accent_color'); email_brandingBackground_color := jResp.StringOf('email_branding.background_color'); email_brandingDefault_accent_color := jResp.StringOf('email_branding.default_accent_color'); email_brandingDefault_background_color := jResp.StringOf('email_branding.default_background_color'); email_brandingId := jResp.StringOf('email_branding.id'); email_brandingImage := jResp.StringOf('email_branding.image'); email_brandingUpload_url := jResp.StringOf('email_branding.upload_url'); bio := jResp.StringOf('bio'); updated_at := jResp.StringOf('updated_at'); link := jResp.StringOf('link'); default_font_color := jResp.StringOf('default_font_color'); image_128 := jResp.StringOf('image_128'); dark_theme := jResp.BoolOf('dark_theme'); disable_sbwm_internally := jResp.BoolOf('disable_sbwm_internally'); account_id := jResp.StringOf('account_id'); name := jResp.StringOf('name'); location := jResp.StringOf('location'); solo := jResp.BoolOf('solo'); watermark := jResp.StringOf('watermark'); file_count := jResp.IntOf('file_count'); duration := jResp.IntOf('duration'); image_32 := jResp.StringOf('image_32'); team_image := jResp.StringOf('team_image'); default_background_color := jResp.StringOf('default_background_color'); resource_id := jResp.StringOf('resource_id'); color := jResp.StringOf('color'); frames := jResp.IntOf('frames'); storage := jResp.IntOf('storage'); collaborator_count := jResp.IntOf('collaborator_count'); creator_id := jResp.StringOf('creator_id'); default_session_watermark_template_id := jResp.StringOf('default_session_watermark_template_id'); archived_storage := jResp.IntOf('archived_storage'); slack_webhook := jResp.StringOf('slack_webhook'); upload_url := jResp.StringOf('upload_url'); member_count := jResp.IntOf('member_count'); v_type := jResp.StringOf('_type'); asset_lifecycle_policy := jResp.StringOf('asset_lifecycle_policy'); member_limit := jResp.StringOf('member_limit'); id := jResp.StringOf('id'); storage_limit := jResp.StringOf('storage_limit'); access := jResp.StringOf('access'); inserted_at := jResp.StringOf('inserted_at'); folder_count := jResp.IntOf('folder_count'); end; |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.