Coder Social home page Coder Social logo

image-search-abstraction-layer's Introduction

Image Search Abstraction Layer

An API which allows to get a list of links to images related to a specific term, and the latest searches.

Notes

I am using Google's Custom Search API, which allows only 100 free requests per day.

This project will not work out of the box, you should set some values in the .env file.

  • MONGO_URL = a string used to connect to MongoDB, I used something like mongodb://localhost:27017/fcc-projects. Note: "fcc-projects" is the name of the database.
  • API_KEY = key to use the Search Engine JSON API. More info here
  • CX = another key, more info here

User stories

  • I can get the image URLs, alt text and page urls for a set of images relating to a given search string.
    • What if there's no results? // An empty array will be returned.
    • What if the server does not answer or is down?
  • I can paginate through the responses by adding a ?offset=2 parameter to the URL.
  • I can get a list of the most recently submitted search strings.
    • Is it really necessary to use MongoDB? // No, but hey it is still practice, don't get lazy!
    • If there's no recent searches, return an empty array.
    • Show only the 10 latest searches (or less if there's less searches)

Questions

  • What happens if I reach the API's 100 requests daily limit?

image-search-abstraction-layer's People

Contributors

geraldhaxhillari avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.