Coder Social home page Coder Social logo

nga-api's Introduction

nga-api

To get started with developing this repo first

git https://github.com/Hitscotty/nga-api.git && cd nga-api
npm install

create a config.js file with your info, be sure to have a db uri to plug in. Copy and paste the following.

const config = {
  PORT: 3000,
  NGA: {
    root: "https://images.nga.gov/en/search/show_advanced_search_page/?service=search&action=do_advanced_search&language=en&form_name=&all_words=&exact_phrase=&exclude_words=&artist_last_name=&keywords_in_title=&accession_number=&school=&Classification=&medium=&year=&year2=",
    onview: "http://www.nga.gov/content/ngaweb/collection-search-result.html?onview=On_View&pageNumber=1",
    online: "http://www.nga.gov/content/ngaweb/collection-search-result.html?artobj_imagesonly=Images_online&pageNumber=1&lastFacet=artobj_imagesonly"
    // add more endpoints here
  },
  NIGHTMARE: {
    waitTimeout: 800000,
    openDevTools: {
      mode: 'detach'
    },
    show: false
  },
  DB: {
    uri: "YOUR_DB_URI_HERE"
  }
}

module.exports = config;

for CLI use you can check supported commands with node app.js --h

endpoints

  • /onview

You can access all the same search categories from the nga website. Heres a sample image object:

{
    "img": "http://media.nga.gov/public/supplemental/objects/1/2/9/9/9/7/129997-crop-0-90x90.jpg",
    "title": "Horgász-stég (Fisherman's Dock)",
    "created": "c. 1930 ",
    "medium": "gelatin silver print ",
    "dimensions": "overall: 22.4 x 17.5 cm (8 13/16 x 6 7/8 in.) ",
    "credit": "Patrons' Permanent Fund ",
    "accession": "2004.63.4 "
  }

nga-api's People

Stargazers

 avatar  avatar  avatar  avatar  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.