Perl
Perl
Frame.io - Get Team ID
See more Frame.io Examples
Get your team ID.Chilkat Perl Downloads
use strict;
use warnings;
use Chilkat2;
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
my $http = Chilkat2::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->AuthToken('<FRAME_IO_DEV_TOKEN>');
$http->SetUrlVar('account_id', 'b1cd046b-a3bf-4ef8-81a6-0afd74ecc455');
my $sbResponseBody = Chilkat2::StringBuilder->new;
my $success = $http->QuickGetSb('https://api.frame.io/v2/accounts/{$account_id}/teams', $sbResponseBody);
if (!$success) {
print $http->LastErrorText, "\n";
exit;
}
my $jResp = Chilkat2::JsonObject->new;
$jResp->LoadSb($sbResponseBody);
$jResp->EmitCompact(0);
print "Response Body:\n";
print $jResp->Emit(), "\n";
my $respStatusCode = $http->LastStatus;
print 'Response Status Code = ', $respStatusCode, "\n";
if ($respStatusCode >= 400) {
print "Response Header:\n";
print $http->LastHeader, "\n";
print "Failed.\n";
exit;
}
# 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
my $image_64 = $jResp->StringOf('image_64');
my $project_count = $jResp->IntOf('project_count');
my $default_color = $jResp->StringOf('default_color');
my $deleted_at = $jResp->StringOf('deleted_at');
my $image_256 = $jResp->StringOf('image_256');
my $background_color = $jResp->StringOf('background_color');
my $font_color = $jResp->StringOf('font_color');
my $email_branding_type = $jResp->StringOf('email_branding._type');
my $email_brandingAccent_color = $jResp->StringOf('email_branding.accent_color');
my $email_brandingBackground_color = $jResp->StringOf('email_branding.background_color');
my $email_brandingDefault_accent_color = $jResp->StringOf('email_branding.default_accent_color');
my $email_brandingDefault_background_color = $jResp->StringOf('email_branding.default_background_color');
my $email_brandingId = $jResp->StringOf('email_branding.id');
my $email_brandingImage = $jResp->StringOf('email_branding.image');
my $email_brandingUpload_url = $jResp->StringOf('email_branding.upload_url');
my $bio = $jResp->StringOf('bio');
my $updated_at = $jResp->StringOf('updated_at');
my $link = $jResp->StringOf('link');
my $default_font_color = $jResp->StringOf('default_font_color');
my $image_128 = $jResp->StringOf('image_128');
my $dark_theme = $jResp->BoolOf('dark_theme');
my $disable_sbwm_internally = $jResp->BoolOf('disable_sbwm_internally');
my $account_id = $jResp->StringOf('account_id');
my $name = $jResp->StringOf('name');
my $location = $jResp->StringOf('location');
my $solo = $jResp->BoolOf('solo');
my $watermark = $jResp->StringOf('watermark');
my $file_count = $jResp->IntOf('file_count');
my $duration = $jResp->IntOf('duration');
my $image_32 = $jResp->StringOf('image_32');
my $team_image = $jResp->StringOf('team_image');
my $default_background_color = $jResp->StringOf('default_background_color');
my $resource_id = $jResp->StringOf('resource_id');
my $color = $jResp->StringOf('color');
my $frames = $jResp->IntOf('frames');
my $storage = $jResp->IntOf('storage');
my $collaborator_count = $jResp->IntOf('collaborator_count');
my $creator_id = $jResp->StringOf('creator_id');
my $default_session_watermark_template_id = $jResp->StringOf('default_session_watermark_template_id');
my $archived_storage = $jResp->IntOf('archived_storage');
my $slack_webhook = $jResp->StringOf('slack_webhook');
my $upload_url = $jResp->StringOf('upload_url');
my $member_count = $jResp->IntOf('member_count');
my $v_type = $jResp->StringOf('_type');
my $asset_lifecycle_policy = $jResp->StringOf('asset_lifecycle_policy');
my $member_limit = $jResp->StringOf('member_limit');
my $id = $jResp->StringOf('id');
my $storage_limit = $jResp->StringOf('storage_limit');
my $access = $jResp->StringOf('access');
my $inserted_at = $jResp->StringOf('inserted_at');
my $folder_count = $jResp->IntOf('folder_count');