peal 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/NOTICE +4 -0
- data/README.md +5 -4
- data/lib/peal/models/api_key.rb +11 -23
- data/lib/peal/models/membership.rb +11 -23
- data/lib/peal/models/new_api_key.rb +15 -23
- data/lib/peal/models/permission.rb +66 -0
- data/lib/peal/version.rb +1 -1
- data/lib/peal.rb +1 -0
- metadata +3 -220
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -136
- data/Rakefile +0 -10
- data/docs/AlreadyMemberEncoded.md +0 -18
- data/docs/AltTextTooLongEncoded.md +0 -20
- data/docs/AnalyticsApi.md +0 -155
- data/docs/AnalyticsSummary.md +0 -30
- data/docs/ApiKey.md +0 -28
- data/docs/ApiKeyNotFoundEncoded.md +0 -18
- data/docs/ApiKeysApi.md +0 -220
- data/docs/ApiKeysRevoke404Response.md +0 -18
- data/docs/AssistantAction.md +0 -24
- data/docs/AssistantActionAnyOf.md +0 -20
- data/docs/AssistantActionAnyOf1.md +0 -20
- data/docs/AssistantActionAnyOf2.md +0 -20
- data/docs/AssistantActionAnyOf3.md +0 -18
- data/docs/AssistantApi.md +0 -149
- data/docs/AssistantFailedEncoded.md +0 -20
- data/docs/AssistantInputRejectedEncoded.md +0 -22
- data/docs/AssistantQuotaExceededEncoded.md +0 -22
- data/docs/AssistantStatus.md +0 -26
- data/docs/AssistantTone.md +0 -15
- data/docs/AssistantUnavailableEncoded.md +0 -18
- data/docs/AttemptResult.md +0 -15
- data/docs/Authorization.md +0 -18
- data/docs/Billing.md +0 -28
- data/docs/BillingApi.md +0 -77
- data/docs/BillingSubscription.md +0 -24
- data/docs/Channel.md +0 -30
- data/docs/ChannelCannotPostEncoded.md +0 -20
- data/docs/ChannelMetrics.md +0 -30
- data/docs/ChannelNotFoundEncoded.md +0 -18
- data/docs/ChannelOptions.md +0 -20
- data/docs/ChannelStatus.md +0 -20
- data/docs/ChannelStatusAnyOf.md +0 -18
- data/docs/ChannelStatusAnyOf1.md +0 -18
- data/docs/ChannelStatusAnyOf2.md +0 -20
- data/docs/ChannelsApi.md +0 -512
- data/docs/ChannelsCompleteConnect404Response.md +0 -18
- data/docs/ChoosableAccount.md +0 -26
- data/docs/ChooseAccounts.md +0 -20
- data/docs/ConnectCallback.md +0 -24
- data/docs/ConnectChannel.md +0 -20
- data/docs/ConnectFailedEncoded.md +0 -20
- data/docs/ConnectFailureReason.md +0 -15
- data/docs/ConnectOutcome.md +0 -26
- data/docs/ConnectOutcomeAnyOf.md +0 -20
- data/docs/ConnectOutcomeAnyOf1.md +0 -24
- data/docs/ConnectablePlatforms.md +0 -18
- data/docs/ContentViolation.md +0 -54
- data/docs/ContentViolationAnyOf.md +0 -18
- data/docs/ContentViolationAnyOf1.md +0 -20
- data/docs/ContentViolationAnyOf10.md +0 -26
- data/docs/ContentViolationAnyOf11.md +0 -22
- data/docs/ContentViolationAnyOf12.md +0 -26
- data/docs/ContentViolationAnyOf13.md +0 -26
- data/docs/ContentViolationAnyOf14.md +0 -26
- data/docs/ContentViolationAnyOf15.md +0 -26
- data/docs/ContentViolationAnyOf16.md +0 -22
- data/docs/ContentViolationAnyOf17.md +0 -26
- data/docs/ContentViolationAnyOf18.md +0 -28
- data/docs/ContentViolationAnyOf19.md +0 -28
- data/docs/ContentViolationAnyOf2.md +0 -20
- data/docs/ContentViolationAnyOf20.md +0 -28
- data/docs/ContentViolationAnyOf21.md +0 -28
- data/docs/ContentViolationAnyOf22.md +0 -30
- data/docs/ContentViolationAnyOf23.md +0 -32
- data/docs/ContentViolationAnyOf24.md +0 -32
- data/docs/ContentViolationAnyOf24Maximum.md +0 -15
- data/docs/ContentViolationAnyOf25.md +0 -28
- data/docs/ContentViolationAnyOf3.md +0 -24
- data/docs/ContentViolationAnyOf4.md +0 -24
- data/docs/ContentViolationAnyOf5.md +0 -28
- data/docs/ContentViolationAnyOf6.md +0 -24
- data/docs/ContentViolationAnyOf7.md +0 -22
- data/docs/ContentViolationAnyOf8.md +0 -28
- data/docs/ContentViolationAnyOf9.md +0 -24
- data/docs/CreatedApiKey.md +0 -20
- data/docs/DatabaseUnavailableEncoded.md +0 -18
- data/docs/DraftPage.md +0 -20
- data/docs/EffectHttpApiErrorBadRequestEncoded.md +0 -18
- data/docs/EngagementDay.md +0 -26
- data/docs/FailureReason.md +0 -15
- data/docs/ForbiddenEncoded.md +0 -18
- data/docs/InvalidDateRangeEncoded.md +0 -18
- data/docs/InvalidTimeRangeEncoded.md +0 -18
- data/docs/InvalidTimeZoneEncoded.md +0 -20
- data/docs/Invitation.md +0 -28
- data/docs/InvitationNotFoundEncoded.md +0 -18
- data/docs/InvitationsApi.md +0 -220
- data/docs/InvitationsCreate409Response.md +0 -18
- data/docs/InvitationsRevoke404Response.md +0 -18
- data/docs/MarkNoticesRead.md +0 -18
- data/docs/Me.md +0 -22
- data/docs/MeUser.md +0 -28
- data/docs/Media.md +0 -40
- data/docs/MediaApi.md +0 -516
- data/docs/MediaAttachment.md +0 -20
- data/docs/MediaContentType.md +0 -15
- data/docs/MediaCreate422Response.md +0 -28
- data/docs/MediaDescription.md +0 -18
- data/docs/MediaDimensions.md +0 -20
- data/docs/MediaGet404Response.md +0 -18
- data/docs/MediaInUseEncoded.md +0 -20
- data/docs/MediaKind.md +0 -15
- data/docs/MediaNotFoundEncoded.md +0 -18
- data/docs/MediaPage.md +0 -20
- data/docs/MediaStatus.md +0 -22
- data/docs/MediaStatusAnyOf.md +0 -18
- data/docs/MediaStatusAnyOf1.md +0 -20
- data/docs/MediaStatusAnyOf2.md +0 -18
- data/docs/MediaStatusAnyOf3.md +0 -20
- data/docs/MediaStoreUnavailableEncoded.md +0 -18
- data/docs/MediaTooLargeEncoded.md +0 -24
- data/docs/MediaUsage.md +0 -20
- data/docs/MembersApi.md +0 -77
- data/docs/Membership.md +0 -26
- data/docs/MetricTotals.md +0 -28
- data/docs/MetricsSnapshot.md +0 -20
- data/docs/NewApiKey.md +0 -22
- data/docs/NewInvitation.md +0 -20
- data/docs/NewUpload.md +0 -22
- data/docs/NonFiniteNumber.md +0 -15
- data/docs/Notice.md +0 -26
- data/docs/NoticeChannel.md +0 -20
- data/docs/NoticeEvent.md +0 -28
- data/docs/NoticeEventAnyOf.md +0 -24
- data/docs/NoticeEventAnyOf1.md +0 -24
- data/docs/NoticeEventAnyOf2.md +0 -22
- data/docs/NoticeEventAnyOf3.md +0 -20
- data/docs/NoticeEventAnyOf4.md +0 -22
- data/docs/NoticePage.md +0 -20
- data/docs/NoticesApi.md +0 -285
- data/docs/NotificationPreferences.md +0 -20
- data/docs/NotificationPreferencesApi.md +0 -144
- data/docs/NotificationPreferencesChange.md +0 -20
- data/docs/NotificationPreferencesChangeEmail.md +0 -24
- data/docs/NotificationPreferencesEmail.md +0 -24
- data/docs/PaidPlan.md +0 -15
- data/docs/PeriodUsage.md +0 -20
- data/docs/Plan.md +0 -15
- data/docs/PlanAllowances.md +0 -24
- data/docs/PlanLimit.md +0 -15
- data/docs/PlanLimitReachedEncoded.md +0 -22
- data/docs/PlanOffer.md +0 -20
- data/docs/Platform.md +0 -15
- data/docs/PlatformUnreachableEncoded.md +0 -18
- data/docs/Post.md +0 -30
- data/docs/PostAnalytics.md +0 -20
- data/docs/PostContent.md +0 -22
- data/docs/PostContentInvalidEncoded.md +0 -20
- data/docs/PostDraft.md +0 -22
- data/docs/PostMetrics.md +0 -26
- data/docs/PostNotFoundEncoded.md +0 -18
- data/docs/PostOutcome.md +0 -15
- data/docs/PostSchedule.md +0 -20
- data/docs/PostStatus.md +0 -15
- data/docs/PostStatusConflictEncoded.md +0 -20
- data/docs/PostTarget.md +0 -36
- data/docs/PostTargetStatus.md +0 -15
- data/docs/PostsApi.md +0 -960
- data/docs/PostsCreate422Response.md +0 -24
- data/docs/PostsGet404Response.md +0 -18
- data/docs/PostsRepost409Response.md +0 -20
- data/docs/PostsSchedule422Response.md +0 -26
- data/docs/PreparedUpload.md +0 -20
- data/docs/ProbeState.md +0 -15
- data/docs/PublicationAttempt.md +0 -30
- data/docs/RejectionReason.md +0 -15
- data/docs/Role.md +0 -15
- data/docs/ScheduleInPastEncoded.md +0 -18
- data/docs/SchedulePost.md +0 -22
- data/docs/SessionApi.md +0 -74
- data/docs/SignedRequest.md +0 -22
- data/docs/SubscriptionStatus.md +0 -15
- data/docs/Suggestion.md +0 -22
- data/docs/SuggestionAnyOf.md +0 -20
- data/docs/SuggestionAnyOf1.md +0 -20
- data/docs/SuggestionRequest.md +0 -20
- data/docs/SystemApi.md +0 -129
- data/docs/TargetConfirmation.md +0 -20
- data/docs/TargetConfirmationAnyOf.md +0 -20
- data/docs/TargetConfirmationAnyOf1.md +0 -18
- data/docs/TargetMetrics.md +0 -32
- data/docs/TargetOptions.md +0 -48
- data/docs/TargetStatusConflictEncoded.md +0 -20
- data/docs/TextOverride.md +0 -20
- data/docs/TextUnit.md +0 -15
- data/docs/TikTokAccount.md +0 -20
- data/docs/TikTokAccountPosting.md +0 -22
- data/docs/TikTokAccountPostingAnyOf.md +0 -20
- data/docs/TikTokAccountPostingAnyOf1.md +0 -20
- data/docs/TikTokBlock.md +0 -15
- data/docs/TikTokCreator.md +0 -32
- data/docs/TikTokOptions.md +0 -34
- data/docs/TikTokPrivacyLevel.md +0 -15
- data/docs/TiktokApi.md +0 -79
- data/docs/TooManyInvitationsEncoded.md +0 -18
- data/docs/TopPost.md +0 -30
- data/docs/TranslationLanguage.md +0 -15
- data/docs/UnauthenticatedEncoded.md +0 -18
- data/docs/UnconfirmedReason.md +0 -15
- data/docs/UnknownChannelsEncoded.md +0 -20
- data/docs/UnknownMediaEncoded.md +0 -20
- data/docs/UnreadNotices.md +0 -18
- data/docs/UnsupportedMediaTypeEncoded.md +0 -20
- data/docs/UploadIncompleteEncoded.md +0 -18
- data/docs/UploadPart.md +0 -22
- data/docs/UploadRejectedEncoded.md +0 -20
- data/docs/UploadTarget.md +0 -26
- data/docs/UploadTargetAnyOf.md +0 -22
- data/docs/UploadTargetAnyOf1.md +0 -24
- data/docs/Usage.md +0 -24
- data/docs/WorkspaceMember.md +0 -26
- data/docs/WorkspaceNotFoundEncoded.md +0 -18
- data/docs/YouTubeOptions.md +0 -32
- data/docs/YouTubePrivacy.md +0 -15
- data/peal.gemspec +0 -41
- data/project.json +0 -17
data/docs/Me.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Peal::Me
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **impersonated_by** | **String** | | |
|
|
8
|
-
| **user** | [**MeUser**](MeUser.md) | | |
|
|
9
|
-
| **workspaces** | [**Array<Membership>**](Membership.md) | | |
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ruby
|
|
14
|
-
require 'peal'
|
|
15
|
-
|
|
16
|
-
instance = Peal::Me.new(
|
|
17
|
-
impersonated_by: null,
|
|
18
|
-
user: null,
|
|
19
|
-
workspaces: null
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
data/docs/MeUser.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Peal::MeUser
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **email** | **String** | | |
|
|
8
|
-
| **email_verified** | **Boolean** | | |
|
|
9
|
-
| **id** | **String** | | |
|
|
10
|
-
| **image** | **String** | | |
|
|
11
|
-
| **locale** | **String** | | |
|
|
12
|
-
| **name** | **String** | | |
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```ruby
|
|
17
|
-
require 'peal'
|
|
18
|
-
|
|
19
|
-
instance = Peal::MeUser.new(
|
|
20
|
-
email: null,
|
|
21
|
-
email_verified: null,
|
|
22
|
-
id: null,
|
|
23
|
-
image: null,
|
|
24
|
-
locale: null,
|
|
25
|
-
name: null
|
|
26
|
-
)
|
|
27
|
-
```
|
|
28
|
-
|
data/docs/Media.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Peal::Media
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **alt_text** | **String** | | |
|
|
8
|
-
| **byte_size** | **Integer** | | |
|
|
9
|
-
| **codec** | **String** | | |
|
|
10
|
-
| **content_type** | [**MediaContentType**](MediaContentType.md) | | |
|
|
11
|
-
| **created_at** | **String** | | |
|
|
12
|
-
| **dimensions** | [**MediaDimensions**](MediaDimensions.md) | | |
|
|
13
|
-
| **duration_ms** | **Integer** | | |
|
|
14
|
-
| **id** | **String** | | |
|
|
15
|
-
| **kind** | [**MediaKind**](MediaKind.md) | | |
|
|
16
|
-
| **status** | [**MediaStatus**](MediaStatus.md) | | |
|
|
17
|
-
| **updated_at** | **String** | | |
|
|
18
|
-
| **url** | **String** | | |
|
|
19
|
-
|
|
20
|
-
## Example
|
|
21
|
-
|
|
22
|
-
```ruby
|
|
23
|
-
require 'peal'
|
|
24
|
-
|
|
25
|
-
instance = Peal::Media.new(
|
|
26
|
-
alt_text: null,
|
|
27
|
-
byte_size: null,
|
|
28
|
-
codec: null,
|
|
29
|
-
content_type: null,
|
|
30
|
-
created_at: null,
|
|
31
|
-
dimensions: null,
|
|
32
|
-
duration_ms: null,
|
|
33
|
-
id: null,
|
|
34
|
-
kind: null,
|
|
35
|
-
status: null,
|
|
36
|
-
updated_at: null,
|
|
37
|
-
url: null
|
|
38
|
-
)
|
|
39
|
-
```
|
|
40
|
-
|
data/docs/MediaApi.md
DELETED
|
@@ -1,516 +0,0 @@
|
|
|
1
|
-
# Peal::MediaApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://app.peal.social*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
| ------ | ------------ | ----------- |
|
|
7
|
-
| [**media_complete**](MediaApi.md#media_complete) | **POST** /api/workspaces/{workspaceId}/media/{mediaId}/complete | Complete an upload |
|
|
8
|
-
| [**media_create**](MediaApi.md#media_create) | **POST** /api/workspaces/{workspaceId}/media | Start an upload |
|
|
9
|
-
| [**media_delete**](MediaApi.md#media_delete) | **DELETE** /api/workspaces/{workspaceId}/media/{mediaId} | Delete media |
|
|
10
|
-
| [**media_describe**](MediaApi.md#media_describe) | **PATCH** /api/workspaces/{workspaceId}/media/{mediaId} | Describe media |
|
|
11
|
-
| [**media_get**](MediaApi.md#media_get) | **GET** /api/workspaces/{workspaceId}/media/{mediaId} | Get media |
|
|
12
|
-
| [**media_list**](MediaApi.md#media_list) | **GET** /api/workspaces/{workspaceId}/media | List media |
|
|
13
|
-
| [**media_usage**](MediaApi.md#media_usage) | **GET** /api/workspaces/{workspaceId}/media/{mediaId}/usage | Get where media is used |
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## media_complete
|
|
17
|
-
|
|
18
|
-
> <Media> media_complete(workspace_id, media_id)
|
|
19
|
-
|
|
20
|
-
Complete an upload
|
|
21
|
-
|
|
22
|
-
Checks that the file reached the store with the declared size and type, joining its parts first, then probes it: the media is ready, or stays uploaded with why it could not be probed. Calling it again is safe, and probes an uploaded file again. Needs media:upload.
|
|
23
|
-
|
|
24
|
-
### Examples
|
|
25
|
-
|
|
26
|
-
```ruby
|
|
27
|
-
require 'time'
|
|
28
|
-
require 'peal'
|
|
29
|
-
# setup authorization
|
|
30
|
-
Peal.configure do |config|
|
|
31
|
-
# Configure Bearer authorization: bearer
|
|
32
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
api_instance = Peal::MediaApi.new
|
|
36
|
-
workspace_id = 'workspace_id_example' # String |
|
|
37
|
-
media_id = 'media_id_example' # String |
|
|
38
|
-
|
|
39
|
-
begin
|
|
40
|
-
# Complete an upload
|
|
41
|
-
result = api_instance.media_complete(workspace_id, media_id)
|
|
42
|
-
p result
|
|
43
|
-
rescue Peal::ApiError => e
|
|
44
|
-
puts "Error when calling MediaApi->media_complete: #{e}"
|
|
45
|
-
end
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
#### Using the media_complete_with_http_info variant
|
|
49
|
-
|
|
50
|
-
This returns an Array which contains the response data, status code and headers.
|
|
51
|
-
|
|
52
|
-
> <Array(<Media>, Integer, Hash)> media_complete_with_http_info(workspace_id, media_id)
|
|
53
|
-
|
|
54
|
-
```ruby
|
|
55
|
-
begin
|
|
56
|
-
# Complete an upload
|
|
57
|
-
data, status_code, headers = api_instance.media_complete_with_http_info(workspace_id, media_id)
|
|
58
|
-
p status_code # => 2xx
|
|
59
|
-
p headers # => { ... }
|
|
60
|
-
p data # => <Media>
|
|
61
|
-
rescue Peal::ApiError => e
|
|
62
|
-
puts "Error when calling MediaApi->media_complete_with_http_info: #{e}"
|
|
63
|
-
end
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Parameters
|
|
67
|
-
|
|
68
|
-
| Name | Type | Description | Notes |
|
|
69
|
-
| ---- | ---- | ----------- | ----- |
|
|
70
|
-
| **workspace_id** | **String** | | |
|
|
71
|
-
| **media_id** | **String** | | |
|
|
72
|
-
|
|
73
|
-
### Return type
|
|
74
|
-
|
|
75
|
-
[**Media**](Media.md)
|
|
76
|
-
|
|
77
|
-
### Authorization
|
|
78
|
-
|
|
79
|
-
[bearer](../README.md#bearer)
|
|
80
|
-
|
|
81
|
-
### HTTP request headers
|
|
82
|
-
|
|
83
|
-
- **Content-Type**: Not defined
|
|
84
|
-
- **Accept**: application/json
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## media_create
|
|
88
|
-
|
|
89
|
-
> <PreparedUpload> media_create(workspace_id, new_upload)
|
|
90
|
-
|
|
91
|
-
Start an upload
|
|
92
|
-
|
|
93
|
-
Records pending media and signs the upload of its file: one PUT for an image or a video up to 16 MiB, one PUT per part for a larger video. Send the file with them, then complete the upload. The requests only take the declared size and content type. Needs media:upload.
|
|
94
|
-
|
|
95
|
-
### Examples
|
|
96
|
-
|
|
97
|
-
```ruby
|
|
98
|
-
require 'time'
|
|
99
|
-
require 'peal'
|
|
100
|
-
# setup authorization
|
|
101
|
-
Peal.configure do |config|
|
|
102
|
-
# Configure Bearer authorization: bearer
|
|
103
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
api_instance = Peal::MediaApi.new
|
|
107
|
-
workspace_id = 'workspace_id_example' # String |
|
|
108
|
-
new_upload = Peal::NewUpload.new({byte_size: 37, content_type: 'content_type_example'}) # NewUpload |
|
|
109
|
-
|
|
110
|
-
begin
|
|
111
|
-
# Start an upload
|
|
112
|
-
result = api_instance.media_create(workspace_id, new_upload)
|
|
113
|
-
p result
|
|
114
|
-
rescue Peal::ApiError => e
|
|
115
|
-
puts "Error when calling MediaApi->media_create: #{e}"
|
|
116
|
-
end
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
#### Using the media_create_with_http_info variant
|
|
120
|
-
|
|
121
|
-
This returns an Array which contains the response data, status code and headers.
|
|
122
|
-
|
|
123
|
-
> <Array(<PreparedUpload>, Integer, Hash)> media_create_with_http_info(workspace_id, new_upload)
|
|
124
|
-
|
|
125
|
-
```ruby
|
|
126
|
-
begin
|
|
127
|
-
# Start an upload
|
|
128
|
-
data, status_code, headers = api_instance.media_create_with_http_info(workspace_id, new_upload)
|
|
129
|
-
p status_code # => 2xx
|
|
130
|
-
p headers # => { ... }
|
|
131
|
-
p data # => <PreparedUpload>
|
|
132
|
-
rescue Peal::ApiError => e
|
|
133
|
-
puts "Error when calling MediaApi->media_create_with_http_info: #{e}"
|
|
134
|
-
end
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Parameters
|
|
138
|
-
|
|
139
|
-
| Name | Type | Description | Notes |
|
|
140
|
-
| ---- | ---- | ----------- | ----- |
|
|
141
|
-
| **workspace_id** | **String** | | |
|
|
142
|
-
| **new_upload** | [**NewUpload**](NewUpload.md) | | |
|
|
143
|
-
|
|
144
|
-
### Return type
|
|
145
|
-
|
|
146
|
-
[**PreparedUpload**](PreparedUpload.md)
|
|
147
|
-
|
|
148
|
-
### Authorization
|
|
149
|
-
|
|
150
|
-
[bearer](../README.md#bearer)
|
|
151
|
-
|
|
152
|
-
### HTTP request headers
|
|
153
|
-
|
|
154
|
-
- **Content-Type**: application/json
|
|
155
|
-
- **Accept**: application/json
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
## media_delete
|
|
159
|
-
|
|
160
|
-
> media_delete(workspace_id, media_id)
|
|
161
|
-
|
|
162
|
-
Delete media
|
|
163
|
-
|
|
164
|
-
Deletes the media and its file, and cancels its upload if it is still pending. Drafts that show it lose it. Posts scheduled or publishing that show it refuse the deletion (`MediaInUse`, listing them): take them back to draft first. Needs media:delete.
|
|
165
|
-
|
|
166
|
-
### Examples
|
|
167
|
-
|
|
168
|
-
```ruby
|
|
169
|
-
require 'time'
|
|
170
|
-
require 'peal'
|
|
171
|
-
# setup authorization
|
|
172
|
-
Peal.configure do |config|
|
|
173
|
-
# Configure Bearer authorization: bearer
|
|
174
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
api_instance = Peal::MediaApi.new
|
|
178
|
-
workspace_id = 'workspace_id_example' # String |
|
|
179
|
-
media_id = 'media_id_example' # String |
|
|
180
|
-
|
|
181
|
-
begin
|
|
182
|
-
# Delete media
|
|
183
|
-
api_instance.media_delete(workspace_id, media_id)
|
|
184
|
-
rescue Peal::ApiError => e
|
|
185
|
-
puts "Error when calling MediaApi->media_delete: #{e}"
|
|
186
|
-
end
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
#### Using the media_delete_with_http_info variant
|
|
190
|
-
|
|
191
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
192
|
-
|
|
193
|
-
> <Array(nil, Integer, Hash)> media_delete_with_http_info(workspace_id, media_id)
|
|
194
|
-
|
|
195
|
-
```ruby
|
|
196
|
-
begin
|
|
197
|
-
# Delete media
|
|
198
|
-
data, status_code, headers = api_instance.media_delete_with_http_info(workspace_id, media_id)
|
|
199
|
-
p status_code # => 2xx
|
|
200
|
-
p headers # => { ... }
|
|
201
|
-
p data # => nil
|
|
202
|
-
rescue Peal::ApiError => e
|
|
203
|
-
puts "Error when calling MediaApi->media_delete_with_http_info: #{e}"
|
|
204
|
-
end
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### Parameters
|
|
208
|
-
|
|
209
|
-
| Name | Type | Description | Notes |
|
|
210
|
-
| ---- | ---- | ----------- | ----- |
|
|
211
|
-
| **workspace_id** | **String** | | |
|
|
212
|
-
| **media_id** | **String** | | |
|
|
213
|
-
|
|
214
|
-
### Return type
|
|
215
|
-
|
|
216
|
-
nil (empty response body)
|
|
217
|
-
|
|
218
|
-
### Authorization
|
|
219
|
-
|
|
220
|
-
[bearer](../README.md#bearer)
|
|
221
|
-
|
|
222
|
-
### HTTP request headers
|
|
223
|
-
|
|
224
|
-
- **Content-Type**: Not defined
|
|
225
|
-
- **Accept**: application/json
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
## media_describe
|
|
229
|
-
|
|
230
|
-
> <Media> media_describe(workspace_id, media_id, media_description)
|
|
231
|
-
|
|
232
|
-
Describe media
|
|
233
|
-
|
|
234
|
-
Sets the media's description, which platforms show to people who cannot see it. It can be written while the file uploads. Needs media:upload.
|
|
235
|
-
|
|
236
|
-
### Examples
|
|
237
|
-
|
|
238
|
-
```ruby
|
|
239
|
-
require 'time'
|
|
240
|
-
require 'peal'
|
|
241
|
-
# setup authorization
|
|
242
|
-
Peal.configure do |config|
|
|
243
|
-
# Configure Bearer authorization: bearer
|
|
244
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
api_instance = Peal::MediaApi.new
|
|
248
|
-
workspace_id = 'workspace_id_example' # String |
|
|
249
|
-
media_id = 'media_id_example' # String |
|
|
250
|
-
media_description = Peal::MediaDescription.new({alt_text: 'alt_text_example'}) # MediaDescription |
|
|
251
|
-
|
|
252
|
-
begin
|
|
253
|
-
# Describe media
|
|
254
|
-
result = api_instance.media_describe(workspace_id, media_id, media_description)
|
|
255
|
-
p result
|
|
256
|
-
rescue Peal::ApiError => e
|
|
257
|
-
puts "Error when calling MediaApi->media_describe: #{e}"
|
|
258
|
-
end
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
#### Using the media_describe_with_http_info variant
|
|
262
|
-
|
|
263
|
-
This returns an Array which contains the response data, status code and headers.
|
|
264
|
-
|
|
265
|
-
> <Array(<Media>, Integer, Hash)> media_describe_with_http_info(workspace_id, media_id, media_description)
|
|
266
|
-
|
|
267
|
-
```ruby
|
|
268
|
-
begin
|
|
269
|
-
# Describe media
|
|
270
|
-
data, status_code, headers = api_instance.media_describe_with_http_info(workspace_id, media_id, media_description)
|
|
271
|
-
p status_code # => 2xx
|
|
272
|
-
p headers # => { ... }
|
|
273
|
-
p data # => <Media>
|
|
274
|
-
rescue Peal::ApiError => e
|
|
275
|
-
puts "Error when calling MediaApi->media_describe_with_http_info: #{e}"
|
|
276
|
-
end
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### Parameters
|
|
280
|
-
|
|
281
|
-
| Name | Type | Description | Notes |
|
|
282
|
-
| ---- | ---- | ----------- | ----- |
|
|
283
|
-
| **workspace_id** | **String** | | |
|
|
284
|
-
| **media_id** | **String** | | |
|
|
285
|
-
| **media_description** | [**MediaDescription**](MediaDescription.md) | | |
|
|
286
|
-
|
|
287
|
-
### Return type
|
|
288
|
-
|
|
289
|
-
[**Media**](Media.md)
|
|
290
|
-
|
|
291
|
-
### Authorization
|
|
292
|
-
|
|
293
|
-
[bearer](../README.md#bearer)
|
|
294
|
-
|
|
295
|
-
### HTTP request headers
|
|
296
|
-
|
|
297
|
-
- **Content-Type**: application/json
|
|
298
|
-
- **Accept**: application/json
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
## media_get
|
|
302
|
-
|
|
303
|
-
> <Media> media_get(workspace_id, media_id)
|
|
304
|
-
|
|
305
|
-
Get media
|
|
306
|
-
|
|
307
|
-
Shows one of the workspace's media. Needs media:read.
|
|
308
|
-
|
|
309
|
-
### Examples
|
|
310
|
-
|
|
311
|
-
```ruby
|
|
312
|
-
require 'time'
|
|
313
|
-
require 'peal'
|
|
314
|
-
# setup authorization
|
|
315
|
-
Peal.configure do |config|
|
|
316
|
-
# Configure Bearer authorization: bearer
|
|
317
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
api_instance = Peal::MediaApi.new
|
|
321
|
-
workspace_id = 'workspace_id_example' # String |
|
|
322
|
-
media_id = 'media_id_example' # String |
|
|
323
|
-
|
|
324
|
-
begin
|
|
325
|
-
# Get media
|
|
326
|
-
result = api_instance.media_get(workspace_id, media_id)
|
|
327
|
-
p result
|
|
328
|
-
rescue Peal::ApiError => e
|
|
329
|
-
puts "Error when calling MediaApi->media_get: #{e}"
|
|
330
|
-
end
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
#### Using the media_get_with_http_info variant
|
|
334
|
-
|
|
335
|
-
This returns an Array which contains the response data, status code and headers.
|
|
336
|
-
|
|
337
|
-
> <Array(<Media>, Integer, Hash)> media_get_with_http_info(workspace_id, media_id)
|
|
338
|
-
|
|
339
|
-
```ruby
|
|
340
|
-
begin
|
|
341
|
-
# Get media
|
|
342
|
-
data, status_code, headers = api_instance.media_get_with_http_info(workspace_id, media_id)
|
|
343
|
-
p status_code # => 2xx
|
|
344
|
-
p headers # => { ... }
|
|
345
|
-
p data # => <Media>
|
|
346
|
-
rescue Peal::ApiError => e
|
|
347
|
-
puts "Error when calling MediaApi->media_get_with_http_info: #{e}"
|
|
348
|
-
end
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
### Parameters
|
|
352
|
-
|
|
353
|
-
| Name | Type | Description | Notes |
|
|
354
|
-
| ---- | ---- | ----------- | ----- |
|
|
355
|
-
| **workspace_id** | **String** | | |
|
|
356
|
-
| **media_id** | **String** | | |
|
|
357
|
-
|
|
358
|
-
### Return type
|
|
359
|
-
|
|
360
|
-
[**Media**](Media.md)
|
|
361
|
-
|
|
362
|
-
### Authorization
|
|
363
|
-
|
|
364
|
-
[bearer](../README.md#bearer)
|
|
365
|
-
|
|
366
|
-
### HTTP request headers
|
|
367
|
-
|
|
368
|
-
- **Content-Type**: Not defined
|
|
369
|
-
- **Accept**: application/json
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
## media_list
|
|
373
|
-
|
|
374
|
-
> <MediaPage> media_list(workspace_id, opts)
|
|
375
|
-
|
|
376
|
-
List media
|
|
377
|
-
|
|
378
|
-
Lists the workspace's media, newest first, 30 a page unless `limit` (at most 100) says otherwise. Pass the page's `nextCursor` as `cursor` for the next one. Needs media:read.
|
|
379
|
-
|
|
380
|
-
### Examples
|
|
381
|
-
|
|
382
|
-
```ruby
|
|
383
|
-
require 'time'
|
|
384
|
-
require 'peal'
|
|
385
|
-
# setup authorization
|
|
386
|
-
Peal.configure do |config|
|
|
387
|
-
# Configure Bearer authorization: bearer
|
|
388
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
api_instance = Peal::MediaApi.new
|
|
392
|
-
workspace_id = 'workspace_id_example' # String |
|
|
393
|
-
opts = {
|
|
394
|
-
cursor: 'cursor_example', # String |
|
|
395
|
-
limit: 'limit_example' # String |
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
begin
|
|
399
|
-
# List media
|
|
400
|
-
result = api_instance.media_list(workspace_id, opts)
|
|
401
|
-
p result
|
|
402
|
-
rescue Peal::ApiError => e
|
|
403
|
-
puts "Error when calling MediaApi->media_list: #{e}"
|
|
404
|
-
end
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
#### Using the media_list_with_http_info variant
|
|
408
|
-
|
|
409
|
-
This returns an Array which contains the response data, status code and headers.
|
|
410
|
-
|
|
411
|
-
> <Array(<MediaPage>, Integer, Hash)> media_list_with_http_info(workspace_id, opts)
|
|
412
|
-
|
|
413
|
-
```ruby
|
|
414
|
-
begin
|
|
415
|
-
# List media
|
|
416
|
-
data, status_code, headers = api_instance.media_list_with_http_info(workspace_id, opts)
|
|
417
|
-
p status_code # => 2xx
|
|
418
|
-
p headers # => { ... }
|
|
419
|
-
p data # => <MediaPage>
|
|
420
|
-
rescue Peal::ApiError => e
|
|
421
|
-
puts "Error when calling MediaApi->media_list_with_http_info: #{e}"
|
|
422
|
-
end
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
### Parameters
|
|
426
|
-
|
|
427
|
-
| Name | Type | Description | Notes |
|
|
428
|
-
| ---- | ---- | ----------- | ----- |
|
|
429
|
-
| **workspace_id** | **String** | | |
|
|
430
|
-
| **cursor** | **String** | | [optional] |
|
|
431
|
-
| **limit** | **String** | | [optional] |
|
|
432
|
-
|
|
433
|
-
### Return type
|
|
434
|
-
|
|
435
|
-
[**MediaPage**](MediaPage.md)
|
|
436
|
-
|
|
437
|
-
### Authorization
|
|
438
|
-
|
|
439
|
-
[bearer](../README.md#bearer)
|
|
440
|
-
|
|
441
|
-
### HTTP request headers
|
|
442
|
-
|
|
443
|
-
- **Content-Type**: Not defined
|
|
444
|
-
- **Accept**: application/json
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
## media_usage
|
|
448
|
-
|
|
449
|
-
> <MediaUsage> media_usage(workspace_id, media_id)
|
|
450
|
-
|
|
451
|
-
Get where media is used
|
|
452
|
-
|
|
453
|
-
Lists the posts that show the media: drafts, which lose it if it is deleted, and posts scheduled or publishing, which keep it from being deleted. Needs media:read.
|
|
454
|
-
|
|
455
|
-
### Examples
|
|
456
|
-
|
|
457
|
-
```ruby
|
|
458
|
-
require 'time'
|
|
459
|
-
require 'peal'
|
|
460
|
-
# setup authorization
|
|
461
|
-
Peal.configure do |config|
|
|
462
|
-
# Configure Bearer authorization: bearer
|
|
463
|
-
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
464
|
-
end
|
|
465
|
-
|
|
466
|
-
api_instance = Peal::MediaApi.new
|
|
467
|
-
workspace_id = 'workspace_id_example' # String |
|
|
468
|
-
media_id = 'media_id_example' # String |
|
|
469
|
-
|
|
470
|
-
begin
|
|
471
|
-
# Get where media is used
|
|
472
|
-
result = api_instance.media_usage(workspace_id, media_id)
|
|
473
|
-
p result
|
|
474
|
-
rescue Peal::ApiError => e
|
|
475
|
-
puts "Error when calling MediaApi->media_usage: #{e}"
|
|
476
|
-
end
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
#### Using the media_usage_with_http_info variant
|
|
480
|
-
|
|
481
|
-
This returns an Array which contains the response data, status code and headers.
|
|
482
|
-
|
|
483
|
-
> <Array(<MediaUsage>, Integer, Hash)> media_usage_with_http_info(workspace_id, media_id)
|
|
484
|
-
|
|
485
|
-
```ruby
|
|
486
|
-
begin
|
|
487
|
-
# Get where media is used
|
|
488
|
-
data, status_code, headers = api_instance.media_usage_with_http_info(workspace_id, media_id)
|
|
489
|
-
p status_code # => 2xx
|
|
490
|
-
p headers # => { ... }
|
|
491
|
-
p data # => <MediaUsage>
|
|
492
|
-
rescue Peal::ApiError => e
|
|
493
|
-
puts "Error when calling MediaApi->media_usage_with_http_info: #{e}"
|
|
494
|
-
end
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
### Parameters
|
|
498
|
-
|
|
499
|
-
| Name | Type | Description | Notes |
|
|
500
|
-
| ---- | ---- | ----------- | ----- |
|
|
501
|
-
| **workspace_id** | **String** | | |
|
|
502
|
-
| **media_id** | **String** | | |
|
|
503
|
-
|
|
504
|
-
### Return type
|
|
505
|
-
|
|
506
|
-
[**MediaUsage**](MediaUsage.md)
|
|
507
|
-
|
|
508
|
-
### Authorization
|
|
509
|
-
|
|
510
|
-
[bearer](../README.md#bearer)
|
|
511
|
-
|
|
512
|
-
### HTTP request headers
|
|
513
|
-
|
|
514
|
-
- **Content-Type**: Not defined
|
|
515
|
-
- **Accept**: application/json
|
|
516
|
-
|
data/docs/MediaAttachment.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Peal::MediaAttachment
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **alt_text** | **String** | | |
|
|
8
|
-
| **media_id** | **String** | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'peal'
|
|
14
|
-
|
|
15
|
-
instance = Peal::MediaAttachment.new(
|
|
16
|
-
alt_text: null,
|
|
17
|
-
media_id: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|
data/docs/MediaContentType.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Peal::MediaCreate422Response
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **_tag** | **String** | | |
|
|
8
|
-
| **content_type** | **String** | | |
|
|
9
|
-
| **byte_size** | **Integer** | | |
|
|
10
|
-
| **kind** | **String** | | |
|
|
11
|
-
| **max_byte_size** | **Integer** | | |
|
|
12
|
-
| **max_length** | **Integer** | | |
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```ruby
|
|
17
|
-
require 'peal'
|
|
18
|
-
|
|
19
|
-
instance = Peal::MediaCreate422Response.new(
|
|
20
|
-
_tag: null,
|
|
21
|
-
content_type: null,
|
|
22
|
-
byte_size: null,
|
|
23
|
-
kind: null,
|
|
24
|
-
max_byte_size: null,
|
|
25
|
-
max_length: null
|
|
26
|
-
)
|
|
27
|
-
```
|
|
28
|
-
|
data/docs/MediaDescription.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Peal::MediaDescription
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **alt_text** | **String** | | |
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require 'peal'
|
|
13
|
-
|
|
14
|
-
instance = Peal::MediaDescription.new(
|
|
15
|
-
alt_text: null
|
|
16
|
-
)
|
|
17
|
-
```
|
|
18
|
-
|
data/docs/MediaDimensions.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Peal::MediaDimensions
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **height** | **Integer** | | |
|
|
8
|
-
| **width** | **Integer** | | |
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ruby
|
|
13
|
-
require 'peal'
|
|
14
|
-
|
|
15
|
-
instance = Peal::MediaDimensions.new(
|
|
16
|
-
height: null,
|
|
17
|
-
width: null
|
|
18
|
-
)
|
|
19
|
-
```
|
|
20
|
-
|