Skip to content

sbwaggoner/the-met-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the-met-api

An simple API to pull art from metmuseum.org, written in C#.

Currently, it pulls an image and basic info from http://metmuseum.org. It accompishes this through scraping, since the Met offers no public APIs.

Code Examples

It is possible to get either a random piece of art:

    var api = new MetApi();
    api.GetPaintingPage();
    var painting = api.GetPaintingInfo();

Or a specific one by passing in an Id:

    var api = new MetApi();
    api.GetPaintingPage();
    var painting = api.GetPaintingInfo(12434);

Examples of other functionality can be seen in the tests, including JSON results.

#Big Plans, Big Plans

I hope to eventually pull in list of art based on various criteria to make it more useful. But I mostly built it because I like randomly browsing the Met's collection.

Demos

A working demo can be seen here: brentwaggoner.com/painting

JSON results can be seen here: brentwaggoner.com/painting/json/api

About

An simple API to pull art from metmuseum.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published