Created
March 16, 2023 22:51
-
-
Save hirobert/044586ce15e397d988acd83f4d85ef87 to your computer and use it in GitHub Desktop.
This file contains 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
// adapted from https://github.com/KaneQc/Noun-Project-API/blob/master/NounProjectAPI.cs | |
using RestSharp; | |
using RestSharp.Authenticators; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Request | |
{ | |
class NounProjectAPI | |
{ | |
void SimpleCall() | |
{ | |
var baseUrl = new Uri("http://api.thenounproject.com"); | |
var client = new RestClient(baseUrl); | |
client.Authenticator = OAuth1Authenticator.ForRequestToken("CLIENT_KEY_HERE", "CLIENT_SECRET_HERE"); | |
var request = new RestRequest("/v2/icon/1", Method.GET); | |
IRestResponse response = client.Execute(request); | |
var content = response.Content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment