Skip to content
Taha Yasser Adnan edited this page Dec 11, 2024 · 4 revisions

Acquiring the APIs Keys:

Ninjas API:

  1. Go to Ninjas API website
  2. Sign up and get your Ninjas API key

Superhero API:

  1. Go to SuperHero API website.
  2. In the Introduction section, press Login with GitHub
  3. Once it's linked get your Superhero API key

Setting up the APIs Keys

There are two methods to set up the APIs keys:

Method 1: Using a Configuration File

  1. Navigate to the configuration directory.
  2. Create a config.json file.
  3. Add the following content to the file:
{
    "api_keys": {
        "ninjas_api_key": "<replace-with-your-ninjas-api-key>",
        "superhero_api_key": "<replace-with-your-superhero-api-key>"
    }
}

Method 2: Using the script

  • Using the CLI:
    python3 fun_apis.py -c
  • Using the interactive mode:
    1. Run the interactive mode:
      python3 fun_apis.py -i 
      # Or
      python3 fun_apis.py --interactive
    2. Use the configure option aka 2 and you will be prompted to configure your api keys.