Closed dravadhis closed 3 years ago
@mathemancer As mentioned in #520 I will begin work on this. Thank You!
@mathemancer I am working on issue on issue #521. The API requires OAuth 1.0 authorisation via an api_key and consumer_secret. To send an authorised request I need to use a library called requests-oauthlib (See here for reference). Should I add this library in the requirements file? Or is there any other way to go about this?
@dravadhis I think that should be fine. Just add it to both requirements files (make sure to freeze the version in prod requirements, but not dev).
Provider API Endpoint / Documentation
http://api.thenounproject.com/
Provider description
The Noun Project API provides a collection of icons and photos.
Licenses Provided
CC BY 3.0 Public Domain Mark 1.0
Provider API Technical info
Rate Limits: 5000 requests/month Overall volume: 3 million (Rough Indication)
Checklist to complete before beginning development
No development should be done on a Provider API Script until the following info is gathered:
General Recommendations for implementation
src/cc_catalog_airflow/dags/provider_api_scripts/
directory.ImageStore
class (Import this fromsrc/cc_catalog_airflow/dags/provider_api_scripts/common/storage/image.py
).DelayedRequester
class (Import this fromsrc/cc_catalog_airflow/dags/provider_api_scripts/common/requester.py
).src/cc_catalog_airflow/dags/provider_api_scripts/modules/etlMods.py
, since that module is deprecated.--date
parameter when run as a script, giving the date for which we should collect images. The form should beYYYY-MM-DD
(so, the script can be run viapython my_favorite_provider.py --date 2018-01-01
).my_favorite_provider.main(date)
. The main should do the same thing calling from the CLI would do.pycodestyle
(available viapip install pycodestyle
) to check for compliance.Examples of other Provider API Scripts
For example Provider API Scripts and accompanying test suites, please see
src/cc_catalog_airflow/dags/provider_api_scripts/flickr.py
andsrc/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py
, orsrc/cc_catalog_airflow/dags/provider_api_scripts/wikimedia_commons.py
andsrc/cc_catalog_airflow/dags/provider_api_scripts/test_wikimedia_commons.py
.