Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,28 @@ name: postmypost_rest_sdk Python package

on: [push, pull_request]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test with pytest
run: |
pytest
pytest --cov=postmypost_rest_sdk
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ docs/_build/
# PyBuilder
target/

#Ipython Notebook
# Ipython Notebook
.ipynb_checkpoints
9 changes: 6 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ stages:
- pip install -r test-requirements.txt
- pytest --cov=postmypost_rest_sdk

pytest-3.8:
extends: .pytest
image: python:3.8-alpine
pytest-3.9:
extends: .pytest
image: python:3.9-alpine
Expand All @@ -26,3 +23,9 @@ pytest-3.10:
pytest-3.11:
extends: .pytest
image: python:3.11-alpine
pytest-3.12:
extends: .pytest
image: python:3.12-alpine
pytest-3.13:
extends: .pytest
image: python:3.13-alpine
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# uncomment the following if needed
#- "3.11-dev" # 3.11 development branch
#- "3.13-dev" # 3.13 development branch
#- "nightly" # nightly build
# command to install dependencies
install:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ For agencies, businesses, and creators looking for the safest, most reliable way

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 4.1.3
- Package version: 1.0.0
- Generator version: 7.6.0
- API version: 4.1.7
- Package version: 1.0.5
- Generator version: 7.16.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://postmypost.io](https://postmypost.io)

## Requirements.

Python 3.8+
Python 3.9+

## Installation & Usage
### pip install
Expand Down Expand Up @@ -158,6 +158,7 @@ Class | Method | HTTP request | Description
- [Publication](docs/Publication.md)
- [PublicationAnalytics](docs/PublicationAnalytics.md)
- [PublicationAnalyticsResponse](docs/PublicationAnalyticsResponse.md)
- [PublicationAnalyticsTypeEnum](docs/PublicationAnalyticsTypeEnum.md)
- [PublicationDetail](docs/PublicationDetail.md)
- [PublicationDetailEditRequest](docs/PublicationDetailEditRequest.md)
- [PublicationDetailPublicationTypeEnum](docs/PublicationDetailPublicationTypeEnum.md)
Expand Down
7 changes: 4 additions & 3 deletions docs/AccountConnectionStatusEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Account connection status: 1 — connected, 2 — authorization required

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `CONNECTED` (value: `1`)

* `AUTH_REQUIRED` (value: `2`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
12 changes: 6 additions & 6 deletions docs/AccountsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ Name | Type | Description | Notes

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**400** | | - |
**401** | | - |
**403** | | - |
**404** | | - |
**422** | | - |
**200** | List of accounts | - |
**400** | Bad request | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not found | - |
**422** | Unprocessable Entity | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

36 changes: 22 additions & 14 deletions docs/AnalyticsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ Name | Type | Description | Notes

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**400** | | - |
**401** | | - |
**403** | | - |
**404** | | - |
**422** | | - |
**200** | List of account metrics | - |
**400** | Bad request | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not found | - |
**422** | Unprocessable Entity | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_analytics_publications**
> PublicationAnalyticsResponse get_analytics_publications(project_id, account_id, date_from, date_to)
> PublicationAnalyticsResponse get_analytics_publications(project_id, account_id, date_from, date_to, type=type, sort=sort, page=page, per_page=per_page)

Get publications analytics

Expand Down Expand Up @@ -140,10 +140,14 @@ with postmypost_rest_sdk.ApiClient(configuration) as api_client:
account_id = 'account_id_example' # str | Account ID
date_from = '2013-10-20' # date | Start date of the period (YYYY-MM-DD)
date_to = '2013-10-20' # date | End date of the period (YYYY-MM-DD)
type = 56 # int | Publication Type: 1 — post, 3 — story, 4 — reels/shorts (optional)
sort = 'sort_example' # str | List sorting parameter. Format: `sort=field` — ascending by field, `sort=-field` — descending by field. Multiple fields can be specified separated by a comma: `sort=field,-another_field`. (optional)
page = 1 # int | Page number (starts from 1). (optional) (default to 1)
per_page = 20 # int | Number of items per page (maximum 50). (optional) (default to 20)

try:
# Get publications analytics
api_response = api_instance.get_analytics_publications(project_id, account_id, date_from, date_to)
api_response = api_instance.get_analytics_publications(project_id, account_id, date_from, date_to, type=type, sort=sort, page=page, per_page=per_page)
print("The response of AnalyticsApi->get_analytics_publications:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -161,6 +165,10 @@ Name | Type | Description | Notes
**account_id** | **str**| Account ID |
**date_from** | **date**| Start date of the period (YYYY-MM-DD) |
**date_to** | **date**| End date of the period (YYYY-MM-DD) |
**type** | **int**| Publication Type: 1 — post, 3 — story, 4 — reels/shorts | [optional]
**sort** | **str**| List sorting parameter. Format: `sort=field` — ascending by field, `sort=-field` — descending by field. Multiple fields can be specified separated by a comma: `sort=field,-another_field`. | [optional]
**page** | **int**| Page number (starts from 1). | [optional] [default to 1]
**per_page** | **int**| Number of items per page (maximum 50). | [optional] [default to 20]

### Return type

Expand All @@ -179,12 +187,12 @@ Name | Type | Description | Notes

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**400** | | - |
**401** | | - |
**403** | | - |
**404** | | - |
**422** | | - |
**200** | List of post analytics | - |
**400** | Bad request | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not found | - |
**422** | Unprocessable Entity | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

12 changes: 6 additions & 6 deletions docs/ChannelsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ Name | Type | Description | Notes

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**400** | | - |
**401** | | - |
**403** | | - |
**404** | | - |
**422** | | - |
**200** | List of channels | - |
**400** | Bad request | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not found | - |
**422** | Unprocessable Entity | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

2 changes: 1 addition & 1 deletion docs/MediaFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**width** | **int** | File width in pixels | [optional]
**height** | **int** | File height in pixels | [optional]
**url** | **str** | URL to download or view the file | [optional]
**url** | **str** | URL to download or view the file |

## Example

Expand Down
12 changes: 6 additions & 6 deletions docs/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ Name | Type | Description | Notes

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
**400** | | - |
**401** | | - |
**403** | | - |
**404** | | - |
**422** | | - |
**200** | List of projects | - |
**400** | Bad request | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Not found | - |
**422** | Unprocessable Entity | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions docs/PublicationAnalytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**content** | **str** | Post text | [optional]
**analytics** | **Dict[str, float]** | Metrics for the post (e.g. views, likes, comments, etc.) |
**attaches** | [**List[Attachment]**](Attachment.md) | Array of attachments |
**type** | [**PublicationAnalyticsTypeEnum**](PublicationAnalyticsTypeEnum.md) | |

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/PublicationAnalyticsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**List[PublicationAnalytics]**](PublicationAnalytics.md) | |
**pages** | [**Pagination**](Pagination.md) | | [optional]

## Example

Expand Down
15 changes: 15 additions & 0 deletions docs/PublicationAnalyticsTypeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PublicationAnalyticsTypeEnum

Publication Type: 1 — post, 3 — story, 4 — reels/shorts

## Enum

* `TYPE_POST` (value: `1`)

* `TYPE_STORY` (value: `3`)

* `TYPE_REELS` (value: `4`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


9 changes: 6 additions & 3 deletions docs/PublicationDetailPublicationTypeEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

Publication type: 1 — post, 2 — story, 4 — reels/shorts/clips

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `POST` (value: `1`)

* `STORY` (value: `2`)

* `REELS_SHORTS_CLIPS` (value: `4`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
9 changes: 6 additions & 3 deletions docs/PublicationDetailTikTokPrivacyStatusEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

TikTok publication privacy: 1 — public, 2 — friends, 3 — private

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PUBLIC` (value: `1`)

* `FRIENDS` (value: `2`)

* `PRIVATE` (value: `3`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
9 changes: 6 additions & 3 deletions docs/PublicationDetailXReplySettingsEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

X reply settings: 1 — Everyone, 2 — Following, 3 — Mentioned users

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `EVERYONE` (value: `1`)

* `FOLLOWING` (value: `2`)

* `MENTIONED_USERS` (value: `3`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
9 changes: 6 additions & 3 deletions docs/PublicationDetailYouTubePrivacyStatusEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

YouTube publication privacy: 1 — public, 2 — unlisted, 3 — private

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `PUBLIC` (value: `1`)

* `UNLISTED` (value: `2`)

* `PRIVATE` (value: `3`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
23 changes: 20 additions & 3 deletions docs/PublicationStatusEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@

Publication status: 0 — deleted, 1 — published, 2 — publishing, 3 — error, 4 — draft, 5 — pending publication, 6 — not deleted due to error, 10 — template, 11 — workflow stage, 12 — approval

## Properties
## Enum

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
* `DELETED` (value: `0`)

* `PUBLISHED` (value: `1`)

* `PUBLISHING` (value: `2`)

* `ERROR` (value: `3`)

* `DRAFT` (value: `4`)

* `PENDING_PUBLICATION` (value: `5`)

* `NOT_DELETED_DUE_TO_ERROR` (value: `6`)

* `TEMPLATE` (value: `10`)

* `WORKFLOW_STAGE` (value: `11`)

* `APPROVAL` (value: `12`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Loading