growwer 1.0.2 → 1.1.1
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/README.md +10 -5
- data/docs/CatalogueApi.md +6 -6
- data/docs/CreateSellerMediaRequest.md +38 -0
- data/docs/CreateSellerMediaRequestPostOffer.md +24 -0
- data/docs/GetMe200ResponseCatalogue.md +1 -1
- data/docs/LinkAdditionOrderBriefingRequest.md +1 -1
- data/docs/ManagedServicesApi.md +3 -3
- data/docs/ProjectCatalogueMediaAllOfProject.md +3 -1
- data/docs/ProjectCatalogueMediaAllOfProjectAiKeywords.md +20 -0
- data/docs/SavedFiltersApi.md +1 -1
- data/docs/SellerMedia.md +2 -0
- data/docs/SellerMediaPostOffer.md +7 -1
- data/docs/SellerMediasApi.md +148 -5
- data/docs/SellerOrderPostDelivery.md +1 -1
- data/docs/SellerOrdersApi.md +1 -1
- data/docs/UpdateSellerMediaRequest.md +2 -0
- data/docs/UpdateSellerMediaRequestPostOffer.md +8 -2
- data/lib/growwer/api/catalogue_api.rb +8 -8
- data/lib/growwer/api/managed_services_api.rb +6 -6
- data/lib/growwer/api/saved_filters_api.rb +2 -2
- data/lib/growwer/api/seller_medias_api.rb +157 -4
- data/lib/growwer/api/seller_orders_api.rb +2 -2
- data/lib/growwer/api_client.rb +1 -1
- data/lib/growwer/models/create_seller_media_request.rb +447 -0
- data/lib/growwer/models/create_seller_media_request_post_offer.rb +273 -0
- data/lib/growwer/models/get_me200_response_catalogue.rb +1 -1
- data/lib/growwer/models/link_addition_order_briefing_request.rb +1 -1
- data/lib/growwer/models/project_catalogue_media_all_of_project.rb +34 -5
- data/lib/growwer/models/project_catalogue_media_all_of_project_ai_keywords.rb +211 -0
- data/lib/growwer/models/seller_media.rb +29 -1
- data/lib/growwer/models/seller_media_post_offer.rb +99 -1
- data/lib/growwer/models/seller_order_post_delivery.rb +1 -1
- data/lib/growwer/models/update_seller_media_request.rb +44 -1
- data/lib/growwer/models/update_seller_media_request_post_offer.rb +96 -12
- data/lib/growwer/version.rb +1 -1
- data/lib/growwer.rb +3 -0
- data/spec/models/create_seller_media_request_post_offer_spec.rb +62 -0
- data/spec/models/create_seller_media_request_spec.rb +100 -0
- data/spec/models/project_catalogue_media_all_of_project_ai_keywords_spec.rb +46 -0
- metadata +14 -2
|
@@ -243,7 +243,7 @@ module Growwer
|
|
|
243
243
|
end
|
|
244
244
|
|
|
245
245
|
# List flash offers
|
|
246
|
-
# The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily
|
|
246
|
+
# The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily limit of that operation apply: each new media costs one unit, a page that holds no new media, an empty one included, costs one, and repeating a request already answered the same day is free while the media lists, topics and language of the project stay as they were.
|
|
247
247
|
# @param project_id [String] The project to search flash offers for.
|
|
248
248
|
# @param [Hash] opts the optional parameters
|
|
249
249
|
# @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
|
|
@@ -278,7 +278,7 @@ module Growwer
|
|
|
278
278
|
# @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
|
|
279
279
|
# @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
|
|
280
280
|
# @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. `user`: your keywords; `publicGenerated`: keywords Growwer found for the project.
|
|
281
|
-
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias
|
|
281
|
+
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
|
|
282
282
|
# @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
|
|
283
283
|
# @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
|
|
284
284
|
# @return [ListFlashOffers200Response]
|
|
@@ -288,7 +288,7 @@ module Growwer
|
|
|
288
288
|
end
|
|
289
289
|
|
|
290
290
|
# List flash offers
|
|
291
|
-
# The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily
|
|
291
|
+
# The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily limit of that operation apply: each new media costs one unit, a page that holds no new media, an empty one included, costs one, and repeating a request already answered the same day is free while the media lists, topics and language of the project stay as they were.
|
|
292
292
|
# @param project_id [String] The project to search flash offers for.
|
|
293
293
|
# @param [Hash] opts the optional parameters
|
|
294
294
|
# @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
|
|
@@ -323,7 +323,7 @@ module Growwer
|
|
|
323
323
|
# @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
|
|
324
324
|
# @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
|
|
325
325
|
# @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. `user`: your keywords; `publicGenerated`: keywords Growwer found for the project.
|
|
326
|
-
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias
|
|
326
|
+
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
|
|
327
327
|
# @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
|
|
328
328
|
# @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
|
|
329
329
|
# @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
|
|
@@ -521,7 +521,7 @@ module Growwer
|
|
|
521
521
|
end
|
|
522
522
|
|
|
523
523
|
# Search the catalogue for a project
|
|
524
|
-
# The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me).
|
|
524
|
+
# The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). Each new media of a page costs one unit of that limit, and a page that holds no new media, an empty one included, costs one unit, so a `total` costs at least one; repeating a request already answered the same day is free, and so are medias seen again that day. A change of the media lists of the project (a media request, a favourite, a discard), its topics or its language makes the same request a new one.
|
|
525
525
|
# @param id [String] The project.
|
|
526
526
|
# @param [Hash] opts the optional parameters
|
|
527
527
|
# @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
|
|
@@ -558,7 +558,7 @@ module Growwer
|
|
|
558
558
|
# @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
|
|
559
559
|
# @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
|
|
560
560
|
# @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. `user`: your keywords; `publicGenerated`: keywords Growwer found for the project.
|
|
561
|
-
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias
|
|
561
|
+
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
|
|
562
562
|
# @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
|
|
563
563
|
# @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
|
|
564
564
|
# @return [ListFlashOffers200Response]
|
|
@@ -568,7 +568,7 @@ module Growwer
|
|
|
568
568
|
end
|
|
569
569
|
|
|
570
570
|
# Search the catalogue for a project
|
|
571
|
-
# The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me).
|
|
571
|
+
# The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). Each new media of a page costs one unit of that limit, and a page that holds no new media, an empty one included, costs one unit, so a `total` costs at least one; repeating a request already answered the same day is free, and so are medias seen again that day. A change of the media lists of the project (a media request, a favourite, a discard), its topics or its language makes the same request a new one.
|
|
572
572
|
# @param id [String] The project.
|
|
573
573
|
# @param [Hash] opts the optional parameters
|
|
574
574
|
# @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
|
|
@@ -605,7 +605,7 @@ module Growwer
|
|
|
605
605
|
# @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
|
|
606
606
|
# @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
|
|
607
607
|
# @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. `user`: your keywords; `publicGenerated`: keywords Growwer found for the project.
|
|
608
|
-
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias
|
|
608
|
+
# @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
|
|
609
609
|
# @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
|
|
610
610
|
# @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
|
|
611
611
|
# @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
|
|
@@ -151,7 +151,7 @@ module Growwer
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
# Download the summary of a campaign's proposals
|
|
154
|
-
# The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`).
|
|
154
|
+
# The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`). One summary of yours is rendered at a time: a request while another is being rendered gets 429 `proposals_summary_in_progress`, to retry after the `Retry-After` header.
|
|
155
155
|
# @param id [String]
|
|
156
156
|
# @param [Hash] opts the optional parameters
|
|
157
157
|
# @option opts [String] :extended Whether to show the prices. (default to 'false')
|
|
@@ -162,7 +162,7 @@ module Growwer
|
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
# Download the summary of a campaign's proposals
|
|
165
|
-
# The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`).
|
|
165
|
+
# The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`). One summary of yours is rendered at a time: a request while another is being rendered gets 429 `proposals_summary_in_progress`, to retry after the `Retry-After` header.
|
|
166
166
|
# @param id [String]
|
|
167
167
|
# @param [Hash] opts the optional parameters
|
|
168
168
|
# @option opts [String] :extended Whether to show the prices. (default to 'false')
|
|
@@ -380,7 +380,7 @@ module Growwer
|
|
|
380
380
|
end
|
|
381
381
|
|
|
382
382
|
# Request a new campaign
|
|
383
|
-
# Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service.
|
|
383
|
+
# Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
|
|
384
384
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
385
385
|
# @param managed_service_request [ManagedServiceRequest]
|
|
386
386
|
# @param [Hash] opts the optional parameters
|
|
@@ -391,7 +391,7 @@ module Growwer
|
|
|
391
391
|
end
|
|
392
392
|
|
|
393
393
|
# Request a new campaign
|
|
394
|
-
# Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service.
|
|
394
|
+
# Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
|
|
395
395
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
396
396
|
# @param managed_service_request [ManagedServiceRequest]
|
|
397
397
|
# @param [Hash] opts the optional parameters
|
|
@@ -459,7 +459,7 @@ module Growwer
|
|
|
459
459
|
end
|
|
460
460
|
|
|
461
461
|
# Ask about the managed service
|
|
462
|
-
# Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign.
|
|
462
|
+
# Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
|
|
463
463
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
464
464
|
# @param managed_service_request [ManagedServiceRequest]
|
|
465
465
|
# @param [Hash] opts the optional parameters
|
|
@@ -470,7 +470,7 @@ module Growwer
|
|
|
470
470
|
end
|
|
471
471
|
|
|
472
472
|
# Ask about the managed service
|
|
473
|
-
# Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign.
|
|
473
|
+
# Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
|
|
474
474
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
475
475
|
# @param managed_service_request [ManagedServiceRequest]
|
|
476
476
|
# @param [Hash] opts the optional parameters
|
|
@@ -20,7 +20,7 @@ module Growwer
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Count the medias of a saved filter
|
|
23
|
-
# How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`.
|
|
23
|
+
# How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`. The catalogue access and the daily limit of the catalogue apply: a count costs one unit of that limit the first time a filter is counted in a UTC day, and counting the same filter again that day is free.
|
|
24
24
|
# @param id [String] The project.
|
|
25
25
|
# @param filter_id [String] The saved filter.
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -31,7 +31,7 @@ module Growwer
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Count the medias of a saved filter
|
|
34
|
-
# How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`.
|
|
34
|
+
# How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`. The catalogue access and the daily limit of the catalogue apply: a count costs one unit of that limit the first time a filter is counted in a UTC day, and counting the same filter again that day is free.
|
|
35
35
|
# @param id [String] The project.
|
|
36
36
|
# @param filter_id [String] The saved filter.
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
@@ -93,6 +93,159 @@ module Growwer
|
|
|
93
93
|
return data, status_code, headers
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
# Register a media you sell on
|
|
97
|
+
# Registers one of your medias, as the media create page does. The media is created with `state: pending_review` and Growwer reviews it in the background, as for a media registered on the web; GET /seller/medias/{id} shows its state. - `rootUrl` is the media's root URL; `typology` is `blog` or `press`. - `country` and `language` take the codes GET /vocabulary publishes; `topics` and `bannedTopics` take its topic ids, at most 100 each, and no topic may be both; `bannedTopics` left out bans none. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR, sent in cents. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising, `never` when left out; `postOffer.promotedSocialNetworks` the social networks posts are promoted on, none when left out. - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; left out, `null` or an empty list offers none. - `extraServices` lists the extra services you offer, none when left out. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. - `acceptMediaPublishingTerms` and `declareMediaOwnership` must be `true`: they accept the media publishing terms and declare that you own or manage the media, as the page's checkboxes do, and are recorded as your consents for the media. A media registered already, by you or by anyone else, is refused with 409 `media_already_registered`, and each such refusal counts toward a daily limit of refusals (429 `media_duplicate_limit_reached` once reached); medias not registered yet are never limited by it. To register many medias, call this operation once per media, each call with its own `Idempotency-Key` and its own answer (201, 409, 422 or 429); there is no batch operation. The request limits apply to the loop as to any calls (600 requests per minute per user and 300 per key), and each 409 `media_already_registered` counts toward the daily limit of refusals as it does for a single call. Retry a call that got no answer with its same `Idempotency-Key`, as for any write.
|
|
98
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
99
|
+
# @param create_seller_media_request [CreateSellerMediaRequest]
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [SellerMedia]
|
|
102
|
+
def create_seller_media(idempotency_key, create_seller_media_request, opts = {})
|
|
103
|
+
data, _status_code, _headers = create_seller_media_with_http_info(idempotency_key, create_seller_media_request, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Register a media you sell on
|
|
108
|
+
# Registers one of your medias, as the media create page does. The media is created with `state: pending_review` and Growwer reviews it in the background, as for a media registered on the web; GET /seller/medias/{id} shows its state. - `rootUrl` is the media's root URL; `typology` is `blog` or `press`. - `country` and `language` take the codes GET /vocabulary publishes; `topics` and `bannedTopics` take its topic ids, at most 100 each, and no topic may be both; `bannedTopics` left out bans none. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR, sent in cents. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising, `never` when left out; `postOffer.promotedSocialNetworks` the social networks posts are promoted on, none when left out. - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; left out, `null` or an empty list offers none. - `extraServices` lists the extra services you offer, none when left out. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. - `acceptMediaPublishingTerms` and `declareMediaOwnership` must be `true`: they accept the media publishing terms and declare that you own or manage the media, as the page's checkboxes do, and are recorded as your consents for the media. A media registered already, by you or by anyone else, is refused with 409 `media_already_registered`, and each such refusal counts toward a daily limit of refusals (429 `media_duplicate_limit_reached` once reached); medias not registered yet are never limited by it. To register many medias, call this operation once per media, each call with its own `Idempotency-Key` and its own answer (201, 409, 422 or 429); there is no batch operation. The request limits apply to the loop as to any calls (600 requests per minute per user and 300 per key), and each 409 `media_already_registered` counts toward the daily limit of refusals as it does for a single call. Retry a call that got no answer with its same `Idempotency-Key`, as for any write.
|
|
109
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
110
|
+
# @param create_seller_media_request [CreateSellerMediaRequest]
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [Array<(SellerMedia, Integer, Hash)>] SellerMedia data, response status code and response headers
|
|
113
|
+
def create_seller_media_with_http_info(idempotency_key, create_seller_media_request, opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: SellerMediasApi.create_seller_media ...'
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'idempotency_key' is set
|
|
118
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SellerMediasApi.create_seller_media"
|
|
120
|
+
end
|
|
121
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
122
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SellerMediasApi.create_seller_media, the character length must be smaller than or equal to 255.'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# verify the required parameter 'create_seller_media_request' is set
|
|
126
|
+
if @api_client.config.client_side_validation && create_seller_media_request.nil?
|
|
127
|
+
fail ArgumentError, "Missing the required parameter 'create_seller_media_request' when calling SellerMediasApi.create_seller_media"
|
|
128
|
+
end
|
|
129
|
+
# resource path
|
|
130
|
+
local_var_path = '/api/v1/seller/medias'
|
|
131
|
+
|
|
132
|
+
# query parameters
|
|
133
|
+
query_params = opts[:query_params] || {}
|
|
134
|
+
|
|
135
|
+
# header parameters
|
|
136
|
+
header_params = opts[:header_params] || {}
|
|
137
|
+
# HTTP header 'Accept' (if needed)
|
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
139
|
+
# HTTP header 'Content-Type'
|
|
140
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
141
|
+
if !content_type.nil?
|
|
142
|
+
header_params['Content-Type'] = content_type
|
|
143
|
+
end
|
|
144
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
145
|
+
|
|
146
|
+
# form parameters
|
|
147
|
+
form_params = opts[:form_params] || {}
|
|
148
|
+
|
|
149
|
+
# http body (model)
|
|
150
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_seller_media_request)
|
|
151
|
+
|
|
152
|
+
# return_type
|
|
153
|
+
return_type = opts[:debug_return_type] || 'SellerMedia'
|
|
154
|
+
|
|
155
|
+
# auth_names
|
|
156
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
157
|
+
|
|
158
|
+
new_options = opts.merge(
|
|
159
|
+
:operation => :"SellerMediasApi.create_seller_media",
|
|
160
|
+
:header_params => header_params,
|
|
161
|
+
:query_params => query_params,
|
|
162
|
+
:form_params => form_params,
|
|
163
|
+
:body => post_body,
|
|
164
|
+
:auth_names => auth_names,
|
|
165
|
+
:return_type => return_type
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug "API called: SellerMediasApi#create_seller_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
171
|
+
end
|
|
172
|
+
return data, status_code, headers
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Delete a media you sell on
|
|
176
|
+
# Deletes one of your medias, in any state, as the media delete button does. The media must have no order in progress: close or reject its orders first. The API never cancels an order for you, and an order placed while the delete runs is refused, never cancelled. What goes with the media, as on the web: - A running flash offer ends with it, and its managed-service proposals are deleted. - Its finished orders stay, with the media's URL; they read `media.id` null. - Buyers' favourites and discards of the domain stay, as they are kept by domain. - The catalogue search drops the media shortly after the 204, as the search index updates asynchronously. Repeating the call with the same `Idempotency-Key` answers the same 204 with `Idempotent-Replayed: true`; a new key after the delete answers 404.
|
|
177
|
+
# @param id [String]
|
|
178
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [nil]
|
|
181
|
+
def delete_seller_media(id, idempotency_key, opts = {})
|
|
182
|
+
delete_seller_media_with_http_info(id, idempotency_key, opts)
|
|
183
|
+
nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Delete a media you sell on
|
|
187
|
+
# Deletes one of your medias, in any state, as the media delete button does. The media must have no order in progress: close or reject its orders first. The API never cancels an order for you, and an order placed while the delete runs is refused, never cancelled. What goes with the media, as on the web: - A running flash offer ends with it, and its managed-service proposals are deleted. - Its finished orders stay, with the media's URL; they read `media.id` null. - Buyers' favourites and discards of the domain stay, as they are kept by domain. - The catalogue search drops the media shortly after the 204, as the search index updates asynchronously. Repeating the call with the same `Idempotency-Key` answers the same 204 with `Idempotent-Replayed: true`; a new key after the delete answers 404.
|
|
188
|
+
# @param id [String]
|
|
189
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
190
|
+
# @param [Hash] opts the optional parameters
|
|
191
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
192
|
+
def delete_seller_media_with_http_info(id, idempotency_key, opts = {})
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug 'Calling API: SellerMediasApi.delete_seller_media ...'
|
|
195
|
+
end
|
|
196
|
+
# verify the required parameter 'id' is set
|
|
197
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
198
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SellerMediasApi.delete_seller_media"
|
|
199
|
+
end
|
|
200
|
+
# verify the required parameter 'idempotency_key' is set
|
|
201
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
202
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SellerMediasApi.delete_seller_media"
|
|
203
|
+
end
|
|
204
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
205
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling SellerMediasApi.delete_seller_media, the character length must be smaller than or equal to 255.'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# resource path
|
|
209
|
+
local_var_path = '/api/v1/seller/medias/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
210
|
+
|
|
211
|
+
# query parameters
|
|
212
|
+
query_params = opts[:query_params] || {}
|
|
213
|
+
|
|
214
|
+
# header parameters
|
|
215
|
+
header_params = opts[:header_params] || {}
|
|
216
|
+
# HTTP header 'Accept' (if needed)
|
|
217
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
218
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
219
|
+
|
|
220
|
+
# form parameters
|
|
221
|
+
form_params = opts[:form_params] || {}
|
|
222
|
+
|
|
223
|
+
# http body (model)
|
|
224
|
+
post_body = opts[:debug_body]
|
|
225
|
+
|
|
226
|
+
# return_type
|
|
227
|
+
return_type = opts[:debug_return_type]
|
|
228
|
+
|
|
229
|
+
# auth_names
|
|
230
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
231
|
+
|
|
232
|
+
new_options = opts.merge(
|
|
233
|
+
:operation => :"SellerMediasApi.delete_seller_media",
|
|
234
|
+
:header_params => header_params,
|
|
235
|
+
:query_params => query_params,
|
|
236
|
+
:form_params => form_params,
|
|
237
|
+
:body => post_body,
|
|
238
|
+
:auth_names => auth_names,
|
|
239
|
+
:return_type => return_type
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
243
|
+
if @api_client.config.debugging
|
|
244
|
+
@api_client.config.logger.debug "API called: SellerMediasApi#delete_seller_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
245
|
+
end
|
|
246
|
+
return data, status_code, headers
|
|
247
|
+
end
|
|
248
|
+
|
|
96
249
|
# Get a media you sell on
|
|
97
250
|
# One of your medias, with your fees, its extras, the competitive fees Growwer suggests and how it performs. Another seller's media is not found.
|
|
98
251
|
# @param id [String]
|
|
@@ -241,8 +394,8 @@ module Growwer
|
|
|
241
394
|
return data, status_code, headers
|
|
242
395
|
end
|
|
243
396
|
|
|
244
|
-
# Edit the
|
|
245
|
-
# Sets the fees of one of your medias, as the media edit page saves them. Send only the
|
|
397
|
+
# Edit the offer of a media you sell on
|
|
398
|
+
# Sets the fees, extra services, typology and post offer characteristics of one of your medias, as the media edit page saves them. Send only the fields you change: a field you send replaces that field wholly, a field you leave out stays as it is, inside `postOffer` too (sending only `postOffer.maximumLinks` keeps your fees). - `typology` is `blog` or `press`. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising (`always` or `never`); `postOffer.promotedSocialNetworks` the full list of social networks posts are promoted on, each once (an empty list for none). - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; `null` or an empty list stops offering link additions. - `extraServices` is the full list of extra services you offer; an empty list removes them all. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and `currentCost` shows the result. `currentCost` may be sent back as read and is ignored. Country, language, topics and comments are not edited here. As on the page, a change of the post offer's price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor's tells Growwer's support team. A restricted seller account may edit its offer.
|
|
246
399
|
# @param id [String]
|
|
247
400
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
248
401
|
# @param update_seller_media_request [UpdateSellerMediaRequest]
|
|
@@ -253,8 +406,8 @@ module Growwer
|
|
|
253
406
|
data
|
|
254
407
|
end
|
|
255
408
|
|
|
256
|
-
# Edit the
|
|
257
|
-
# Sets the fees of one of your medias, as the media edit page saves them. Send only the
|
|
409
|
+
# Edit the offer of a media you sell on
|
|
410
|
+
# Sets the fees, extra services, typology and post offer characteristics of one of your medias, as the media edit page saves them. Send only the fields you change: a field you send replaces that field wholly, a field you leave out stays as it is, inside `postOffer` too (sending only `postOffer.maximumLinks` keeps your fees). - `typology` is `blog` or `press`. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising (`always` or `never`); `postOffer.promotedSocialNetworks` the full list of social networks posts are promoted on, each once (an empty list for none). - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; `null` or an empty list stops offering link additions. - `extraServices` is the full list of extra services you offer; an empty list removes them all. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and `currentCost` shows the result. `currentCost` may be sent back as read and is ignored. Country, language, topics and comments are not edited here. As on the page, a change of the post offer's price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor's tells Growwer's support team. A restricted seller account may edit its offer.
|
|
258
411
|
# @param id [String]
|
|
259
412
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
260
413
|
# @param update_seller_media_request [UpdateSellerMediaRequest]
|
|
@@ -94,7 +94,7 @@ module Growwer
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Deliver an order
|
|
97
|
-
# Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL
|
|
97
|
+
# Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL without `<` or `>`, as the web does.
|
|
98
98
|
# @param id [String]
|
|
99
99
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
@@ -106,7 +106,7 @@ module Growwer
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
# Deliver an order
|
|
109
|
-
# Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL
|
|
109
|
+
# Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL without `<` or `>`, as the web does.
|
|
110
110
|
# @param id [String]
|
|
111
111
|
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
112
112
|
# @param [Hash] opts the optional parameters
|
data/lib/growwer/api_client.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Growwer
|
|
|
34
34
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
35
35
|
def initialize(config = Configuration.default)
|
|
36
36
|
@config = config
|
|
37
|
-
@user_agent = "growwer-ruby/1.
|
|
37
|
+
@user_agent = "growwer-ruby/1.1.1"
|
|
38
38
|
@default_headers = {
|
|
39
39
|
'Content-Type' => 'application/json',
|
|
40
40
|
'User-Agent' => @user_agent
|