Bird

PATH: animal/bird
METHOD: get
Required queries:
    Status: 200 | Response type: json
    Output:
    {
        image: "https://i.imgur.com/fClJeO6.jpg",
        fact: "Animal fact"
    }
    
    Status: 500 | Response type: json
    Output:
    {
    error: "API is starting up, please request again in a while"
    }
    
    Status: 429 | Response type: json
    Output:
    {
    "error": "Too many requests, please try again later."
    }
    
    const fetch = require('node-fetch')
    
    fetch('https://some-random-api.ml/animal/bird')
    .then(res => res.json())
    .then(json => {
        console.log(json)
    });
    
    import requests
    
    def get_bird():
        #making a GET request to the endpoint.
        resp = requests.get("https://some-random-api.ml/animal/bird")
        #checking if resp has a healthy status code.
        if 300 > resp.status_code >= 200:
            content = resp.json() #We have a dict now.
        else:
            content = f"Recieved a bad status code of {resp.status_code}."
        print(content)
    get_bird())
    

    Cat

    PATH: animal/cat
    METHOD: get
    Required queries:
      Status: 200 | Response type: json
      Output:
      {
          image: "https://i.imgur.com/fClJeO6.jpg",
          fact: "Animal fact"
      }
      
      Status: 500 | Response type: json
      Output:
      {
      error: "API is starting up, please request again in a while"
      }
      
      Status: 429 | Response type: json
      Output:
      {
      "error": "Too many requests, please try again later."
      }
      
      const fetch = require('node-fetch')
      
      fetch('https://some-random-api.ml/animal/cat')
      .then(res => res.json())
      .then(json => {
          console.log(json)
      });
      
      import requests
      
      def get_cat():
          #making a GET request to the endpoint.
          resp = requests.get("https://some-random-api.ml/animal/cat")
          #checking if resp has a healthy status code.
          if 300 > resp.status_code >= 200:
              content = resp.json() #We have a dict now.
          else:
              content = f"Recieved a bad status code of {resp.status_code}."
          print(content)
      get_cat())
      

      Dog

      PATH: animal/dog
      METHOD: get
      Required queries:
        Status: 200 | Response type: json
        Output:
        {
            image: "https://i.imgur.com/fClJeO6.jpg",
            fact: "Animal fact"
        }
        
        Status: 500 | Response type: json
        Output:
        {
        error: "API is starting up, please request again in a while"
        }
        
        Status: 429 | Response type: json
        Output:
        {
        "error": "Too many requests, please try again later."
        }
        
        const fetch = require('node-fetch')
        
        fetch('https://some-random-api.ml/animal/dog')
        .then(res => res.json())
        .then(json => {
            console.log(json)
        });
        
        import requests
        
        def get_dog():
            #making a GET request to the endpoint.
            resp = requests.get("https://some-random-api.ml/animal/dog")
            #checking if resp has a healthy status code.
            if 300 > resp.status_code >= 200:
                content = resp.json() #We have a dict now.
            else:
                content = f"Recieved a bad status code of {resp.status_code}."
            print(content)
        get_dog())
        

        fox

        PATH: animal/fox
        METHOD: get
        Required queries:
          Status: 200 | Response type: json
          Output:
          {
              image: "https://i.imgur.com/fClJeO6.jpg",
              fact: "Animal fact"
          }
          
          Status: 500 | Response type: json
          Output:
          {
          error: "API is starting up, please request again in a while"
          }
          
          Status: 429 | Response type: json
          Output:
          {
          "error": "Too many requests, please try again later."
          }
          
          const fetch = require('node-fetch')
          
          fetch('https://some-random-api.ml/animal/fox')
          .then(res => res.json())
          .then(json => {
              console.log(json)
          });
          
          import requests
          
          def get_fox():
              #making a GET request to the endpoint.
              resp = requests.get("https://some-random-api.ml/animal/fox")
              #checking if resp has a healthy status code.
              if 300 > resp.status_code >= 200:
                  content = resp.json() #We have a dict now.
              else:
                  content = f"Recieved a bad status code of {resp.status_code}."
              print(content)
          get_fox())
          

          kangaroo

          PATH: animal/kangaroo
          METHOD: get
          Required queries:
            Status: 200 | Response type: json
            Output:
            {
                image: "https://i.imgur.com/fClJeO6.jpg",
                fact: "Animal fact"
            }
            
            Status: 500 | Response type: json
            Output:
            {
            error: "API is starting up, please request again in a while"
            }
            
            Status: 429 | Response type: json
            Output:
            {
            "error": "Too many requests, please try again later."
            }
            
            const fetch = require('node-fetch')
            
            fetch('https://some-random-api.ml/animal/kangaroo')
            .then(res => res.json())
            .then(json => {
                console.log(json)
            });
            
            import requests
            
            def get_kangaroo():
                #making a GET request to the endpoint.
                resp = requests.get("https://some-random-api.ml/animal/kangaroo")
                #checking if resp has a healthy status code.
                if 300 > resp.status_code >= 200:
                    content = resp.json() #We have a dict now.
                else:
                    content = f"Recieved a bad status code of {resp.status_code}."
                print(content)
            get_kangaroo())
            

            koala

            PATH: animal/koala
            METHOD: get
            Required queries:
              Status: 200 | Response type: json
              Output:
              {
                  image: "https://i.imgur.com/fClJeO6.jpg",
                  fact: "Animal fact"
              }
              
              Status: 500 | Response type: json
              Output:
              {
              error: "API is starting up, please request again in a while"
              }
              
              Status: 429 | Response type: json
              Output:
              {
              "error": "Too many requests, please try again later."
              }
              
              const fetch = require('node-fetch')
              
              fetch('https://some-random-api.ml/animal/koala')
              .then(res => res.json())
              .then(json => {
                  console.log(json)
              });
              
              import requests
              
              def get_koala():
                  #making a GET request to the endpoint.
                  resp = requests.get("https://some-random-api.ml/animal/koala")
                  #checking if resp has a healthy status code.
                  if 300 > resp.status_code >= 200:
                      content = resp.json() #We have a dict now.
                  else:
                      content = f"Recieved a bad status code of {resp.status_code}."
                  print(content)
              get_koala())
              

              panda

              PATH: animal/panda
              METHOD: get
              Required queries:
                Status: 200 | Response type: json
                Output:
                {
                    image: "https://i.imgur.com/fClJeO6.jpg",
                    fact: "Animal fact"
                }
                
                Status: 500 | Response type: json
                Output:
                {
                error: "API is starting up, please request again in a while"
                }
                
                Status: 429 | Response type: json
                Output:
                {
                "error": "Too many requests, please try again later."
                }
                
                const fetch = require('node-fetch')
                
                fetch('https://some-random-api.ml/animal/panda')
                .then(res => res.json())
                .then(json => {
                    console.log(json)
                });
                
                import requests
                
                def get_panda():
                    #making a GET request to the endpoint.
                    resp = requests.get("https://some-random-api.ml/animal/panda")
                    #checking if resp has a healthy status code.
                    if 300 > resp.status_code >= 200:
                        content = resp.json() #We have a dict now.
                    else:
                        content = f"Recieved a bad status code of {resp.status_code}."
                    print(content)
                get_panda())
                

                raccoon

                PATH: animal/raccoon
                METHOD: get
                Required queries:
                  Status: 200 | Response type: json
                  Output:
                  {
                      image: "https://i.imgur.com/fClJeO6.jpg",
                      fact: "Animal fact"
                  }
                  
                  Status: 500 | Response type: json
                  Output:
                  {
                  error: "API is starting up, please request again in a while"
                  }
                  
                  Status: 429 | Response type: json
                  Output:
                  {
                  "error": "Too many requests, please try again later."
                  }
                  
                  const fetch = require('node-fetch')
                  
                  fetch('https://some-random-api.ml/animal/raccoon')
                  .then(res => res.json())
                  .then(json => {
                      console.log(json)
                  });
                  
                  import requests
                  
                  def get_raccoon():
                      #making a GET request to the endpoint.
                      resp = requests.get("https://some-random-api.ml/animal/raccoon")
                      #checking if resp has a healthy status code.
                      if 300 > resp.status_code >= 200:
                          content = resp.json() #We have a dict now.
                      else:
                          content = f"Recieved a bad status code of {resp.status_code}."
                      print(content)
                  get_raccoon())
                  

                  Red Panda

                  PATH: animal/red_panda
                  METHOD: get
                  Required queries:
                    Status: 200 | Response type: json
                    Output:
                    {
                        image: "https://i.imgur.com/fClJeO6.jpg",
                        fact: "Animal fact"
                    }
                    
                    Status: 500 | Response type: json
                    Output:
                    {
                    error: "API is starting up, please request again in a while"
                    }
                    
                    Status: 429 | Response type: json
                    Output:
                    {
                    "error": "Too many requests, please try again later."
                    }
                    
                    const fetch = require('node-fetch')
                    
                    fetch('https://some-random-api.ml/animal/red_panda')
                    .then(res => res.json())
                    .then(json => {
                        console.log(json)
                    });
                    
                    import requests
                    
                    def get_red_panda():
                        #making a GET request to the endpoint.
                        resp = requests.get("https://some-random-api.ml/animal/red_panda")
                        #checking if resp has a healthy status code.
                        if 300 > resp.status_code >= 200:
                            content = resp.json() #We have a dict now.
                        else:
                            content = f"Recieved a bad status code of {resp.status_code}."
                        print(content)
                    get_red_panda())