Files
Untappd.Net/index.html
2015-05-02 21:19:04 -04:00

81 lines
5.5 KiB
HTML

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Untappd.net by tparnell8</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">Untappd.net</h1>
<h2 class="project-tagline">C# Wrapper over untappd api</h2>
<a href="https://github.com/tparnell8/Untappd.Net" class="btn">View on GitHub</a>
<a href="https://github.com/tparnell8/Untappd.Net/zipball/master" class="btn">Download .zip</a>
<a href="https://github.com/tparnell8/Untappd.Net/tarball/master" class="btn">Download .tar.gz</a>
</section>
<section class="main-content">
<h3>
<a id="welcome-untappdnet" class="anchor" href="#welcome-untappdnet" aria-hidden="true"><span class="octicon octicon-link"></span></a>Welcome Untappd.Net</h3>
<p>This is a simple C# Wrapper over the <a href="https://untappd.com/">Untappd API</a></p>
<h3>
<a id="getting-help" class="anchor" href="#getting-help" aria-hidden="true"><span class="octicon octicon-link"></span></a>Getting Help</h3>
<p>You can find help from us by visiting <a href="https://gitter.im/tparnell8/Untappd.Net">our chat room</a>, reading the <a href="https://untappd.com/api/docs">untappd api docs</a>, or by submitting issues.</p>
<h3>
<a id="getting-started" class="anchor" href="#getting-started" aria-hidden="true"><span class="octicon octicon-link"></span></a>Getting Started</h3>
<p>Before you use our wrapper you need an API key, and secret. You will have to request that from the Untappd guys. Once you have that its as simple as calling the repository with the correct request. <strong><em>Note</em></strong> some parts of the Untappd API require an oauth token, which you can get with other <a href="https://github.com/RockstarLabs/OwinOAuthProviders">oauth providers</a>. Our library does have a AuthenticationHelper class which can help you generate the various url's needed to interact with Untappd's API.</p>
<div class="highlight highlight-csharp"><pre>
<span class="pl-k">var</span> ts = <span class="pl-k">new</span> UnAuthenticatedUntappdCredentials(<span class="pl-s"><span class="pl-pds">"</span>key<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>secret<span class="pl-pds">"</span></span>);
<span class="pl-k">var</span> t = <span class="pl-k">new</span> Repository().Get&lt;UserDistinctBeers&gt;(ts, <span class="pl-s"><span class="pl-pds">"</span>tparnell<span class="pl-pds">"</span></span>);
<span class="pl-k">var</span> t = <span class="pl-k">new</span> Repository().Get&lt;BeerInfo&gt;(ts, <span class="pl-s"><span class="pl-pds">"</span>BeerIdHere<span class="pl-pds">"</span></span>);
</pre></div>
<p>Post and/or Action requests are similar.</p>
<div class="highlight highlight-csharp"><pre>
<span class="pl-k">var</span> ts = <span class="pl-k">new</span> AuthenticatedUntappdCredentials(<span class="pl-s"><span class="pl-pds">"</span>token<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>key<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>secret<span class="pl-pds">"</span></span>);
<span class="pl-k">var</span> checkin = <span class="pl-k">new</span> CheckIn(<span class="pl-s"><span class="pl-pds">"</span>-5<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>EST<span class="pl-pds">"</span></span>, <span class="pl-c1">1044097</span>) { Shout = <span class="pl-s"><span class="pl-pds">"</span>Awesome Brew<span class="pl-pds">"</span></span>, Rating = <span class="pl-c1">4</span> };
<span class="pl-k">var</span> response = repository.Post(ts, checkin);
</pre></div>
<h3>
<a id="authors-and-contributors" class="anchor" href="#authors-and-contributors" aria-hidden="true"><span class="octicon octicon-link"></span></a>Authors and Contributors</h3>
<ul>
<li>Tommy Parnell (<a href="https://github.com/tparnell8" class="user-mention">@tparnell8</a>)</li>
<li>Rodrigo P Reis (<a href="https://github.com/rodkings" class="user-mention">@rodkings</a>)</li>
</ul>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/tparnell8/Untappd.Net">Untappd.net</a> is maintained by <a href="https://github.com/tparnell8">tparnell8</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-48128396-2");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>