Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

[API Integration] The Noun Project #521

Closed
5 of 6 tasks
dravadhis opened this issue Oct 23, 2020 · 3 comments
Closed
5 of 6 tasks

[API Integration] The Noun Project #521

dravadhis opened this issue Oct 23, 2020 · 3 comments
Labels
providers 🙅 status: discontinued Not suitable for work as repo is in maintenance

Comments

@dravadhis
Copy link
Contributor

dravadhis commented Oct 23, 2020

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:

  • Verify there is a way to retrieve the entire relevant portion of the provider's collection in a systematic way via their API.
  • Verify the API provides license info (license type and version; license URL provides both, and is preferred)
  • Verify the API provides stable direct links to individual works.
  • Verify the API provides a stable landing page URL to individual works.
  • Note other info the API provides, such as thumbnails, dimensions, attribution info (required if non-CC0 licenses will be kept), title, description, other meta data, tags, etc.
  • Attach example responses to API queries that have the relevant info.

General Recommendations for implementation

  • The script should be in the src/cc_catalog_airflow/dags/provider_api_scripts/ directory.
  • The script should have a test suite in the same directory.
  • The script must use the ImageStore class (Import this from
    src/cc_catalog_airflow/dags/provider_api_scripts/common/storage/image.py).
  • The script should use the DelayedRequester class (Import this from
    src/cc_catalog_airflow/dags/provider_api_scripts/common/requester.py).
  • The script must not use anything from
    src/cc_catalog_airflow/dags/provider_api_scripts/modules/etlMods.py, since
    that module is deprecated.
  • If the provider API has can be queried by 'upload date' or something similar,
    the script should take a --date parameter when run as a script, giving the
    date for which we should collect images. The form should be YYYY-MM-DD (so,
    the script can be run via python my_favorite_provider.py --date 2018-01-01).
  • The script must provide a main function that takes the same parameters as from
    the CLI. In our example from above, we'd then have a main function
    my_favorite_provider.main(date). The main should do the same thing calling
    from the CLI would do.
  • The script must conform to PEP8. Please use pycodestyle (available via
    pip install pycodestyle) to check for compliance.
  • The script should use small, testable functions.
  • The test suite for the script may break PEP8 rules regarding long lines where
    appropriate (e.g., long strings for testing).

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 and
  • src/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py, or
  • src/cc_catalog_airflow/dags/provider_api_scripts/wikimedia_commons.py and
  • src/cc_catalog_airflow/dags/provider_api_scripts/test_wikimedia_commons.py.
@cc-open-source-bot cc-open-source-bot added this to Pending Review in Backlog Oct 23, 2020
@dravadhis
Copy link
Contributor Author

@mathemancer As mentioned in #520 I will begin work on this.
Thank You!

@dravadhis
Copy link
Contributor Author

@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?

@mathemancer
Copy link
Contributor

@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).

@cc-open-source-bot cc-open-source-bot added the 🏷 status: label work required Needs proper labelling before it can be worked on label Dec 2, 2020
@kgodey kgodey added this to [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey removed this from [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey added this to [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey removed this from [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey added this to [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey removed this from [TEMPORARY] Deprioritize in Active Sprint Dec 2, 2020
@kgodey kgodey added 🙅 status: discontinued Not suitable for work as repo is in maintenance and removed 🏷 status: label work required Needs proper labelling before it can be worked on labels Dec 16, 2020
@kgodey kgodey closed this as completed Dec 16, 2020
@kgodey kgodey moved this from Pending Review to Done in Backlog Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
providers 🙅 status: discontinued Not suitable for work as repo is in maintenance
Development

Successfully merging a pull request may close this issue.

4 participants