Created
December 1, 2020 17:12
-
-
Save mjy/2ee33d7f047649a5b79ce3f0f2232a56 to your computer and use it in GitHub Desktop.
A basic request to get specimen data back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'csv' | |
require 'amazing_print' | |
require 'uri' | |
require 'net/http' | |
project_token = 'adhBi59dc13U7RxbgNE5HQ' | |
URL = 'https://sfg.taxonworks.org/api/v1/' | |
url = URL + '/collection_objects' + '?project_token=' + project_token | |
b = URI(url) | |
object = JSON.parse(::Net::HTTP.get(b)) | |
puts b | |
ap object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment