Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bzdvdn/medialogia-api-wrapper
Medialogia api wrapper
https://github.com/bzdvdn/medialogia-api-wrapper
Last synced: 6 days ago
JSON representation
Medialogia api wrapper
- Host: GitHub
- URL: https://github.com/bzdvdn/medialogia-api-wrapper
- Owner: bzdvdn
- Created: 2019-12-03T13:49:47.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T20:29:11.000Z (about 3 years ago)
- Last Synced: 2024-12-15T13:50:23.232Z (21 days ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Medialogia api wrapper
# Installation
Install using `pip`...
pip install medialogia-api-wrapper
## Medialogia api documentation
* http://sm.howto.mlg.ru/wp-content/uploads/2019/01/Rukovodstvo-po-API.pdf### Usage
```python
from medialogia import Client
client = Client('', '')# create report
client.create_report(search_query='query', author_urls=['http://test.ru'], blog_urls=['http://test,ru'])# delete report
client.delete_report(report_id='')# get posts
from datetime import datetime
posts = client.get_posts(report_id='',
date_from=datetime(2019, 11, 20, 0, 0, 0),
date_to=datetime(2019, 11, 23, 0, 0, 0))# get posts by objects
reports_by_objs = client.get_posts_by_objects(
report_id='',
date_from=datetime(2019, 11, 20, 0, 0, 0),
date_to=datetime(2019, 11, 23, 0, 0, 0)
)# update report
client.update_report.create_report(search_query='query', author_urls=['http://test.ru'], blog_urls=['http://test,ru'])# get posts with sort
post_with_sorts = client.get_posts_with_sort(
report_id='',
date_from=datetime(2019, 11, 20, 0, 0, 0),
date_to=datetime(2019, 11, 23, 0, 0, 0),
sort_type=1,
page_size=50,
page_index=1)# get posts from timestamp
posts_from_timestamp = client.get_posts_from_timestamp(
report_id='',
timestamp=datetime(2019, 11, 20, 0, 0, 0),
page_index=1,
page_size=5)
# create report by post urls
client.create_report_by_post_urls(post_urls=['http://test.ru'])# create report history
report_history = client.create_report_history(report_id='', date_from=datetime(2019, 11, 20, 0, 0, 0))
```#### TODO
* examples
* tests