Skip to content

Latest commit

 

History

History
75 lines (65 loc) · 1.55 KB

api_requests.md

File metadata and controls

75 lines (65 loc) · 1.55 KB

API requests

how to execute various http methods: DELETE, GET, POST, PUT.

Example HTTP GET request

from tapi_yandex_market import YandexMarket

client = YandexMarket(...)
result = client.campaigns().get()
# Raw data.
print(result.data)

Example HTTP POST request

Resource documentation

from tapi_yandex_market import YandexMarket

client = YandexMarket(...)
body = {
  "parameters":
  [
    {
      "deleted": {boolean},
      "name": "{enum}",
      "values":
      [
        {int32},
        ...
      ]
    },
    ...
  ]
}
result = client.feed_parameters(campaignId=..., feedId=...).post(data=body)
# Raw data.
print(result.data)

Example HTTP PUT request

Resource documentation

from tapi_yandex_market import YandexMarket

client = YandexMarket(...)
body = {
  "bids":
  [
    {
      "feedId": {int64},
      "offerId": "{string}",
      "bid": {double},
      "dontPullUpBids": {boolean}
    },
    ...
  ]
}
result = client.bids(campaignId=...).put(data=body)
# Raw data.
print(result.data)

Example HTTP DELETE request

Resource documentation

from tapi_yandex_market import YandexMarket

client = YandexMarket(...)
result = client.outlets_licenses(campaignId=...).delete()
# Raw data.
print(result.data)