Skip to main content

Django package for MyNewsDesk API

Project description

=================
django-mynewsdesk
=================

Django package for MyNewsDesk API

Quick start
-----------

1. Add "mynewsdesk" to your INSTALLED_APPS setting like this:

INSTALLED_APPS = (
...
'mynewsdesk',
)

2. Add MYNEWSDESK_KEY to settings like this:

MYNEWSDESK_KEY = 'your unique key'

3. Run `python manage.py migrate` to create the polls models.


API
---

- mynewsdesk.api.request(service, params) - request to MyNewsDesk API

service: MyNewsDesk API service name
params: params for request

return: request response (request library)


- mynewsdesk.api.get_list(type_of_media) - request material list

type_of_media: mynewsdesk.TYPE_PRESSRELEASE, mynewsdesk.TYPE_NEWS, etc...

returns: JSON from api request


- mynewsdesk.api.subscribe(email, types_list) - subscribe email

email: e-mail of subscriber
types_list: list of material types for subscription


- mynewsdesk.sync.sync_list(type_of_media) - synchronize materials to local database

type_of_media: mynewsdesk.TYPE_PRESSRELEASE, mynewsdesk.TYPE_NEWS, etc...

returns: dictionary like this {updated: n, create: n, errors: n}


- mynewsdesk.sync.sync_all() - synchronize materials of all types to local database

returns: dictionary like this {updated: n, create: n, errors: n}


Contribute & Support
--------------------

If you have an issue requests, or you find a bug, you can easily report them on GitHub Issues.
If you want to fix bug or create new feature, just fork, make changes and create a pull request. List of TODOs you can find below here.
Furthermore, you can create better documentation.

Credits
-------

Created and maintained by `Pavel Kozlov <http://pkozlov.ru/>`_

Project details


Release history Release notifications

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

This version
History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-mynewsdesk-0.1.tar.gz (5.3 kB) Copy SHA256 hash SHA256 Source None Aug 8, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page