Eventbrite API list events 403 - api

I'm trying to fetch events base on time from Eventbrite API with the following command from the docs
curl -X GET https://www.eventbriteapi.com/v3/events/search?date_modified.range_start=2018-01-01T00:00:01Z -H 'Authorization: Bearer MY_API_TOKEN'
However, it returns me 403 with the following HTML in response body:
<html lang="en">
<head>
<title>Whoops!</title>
</head>
<body>
<div id="whoops_wrapper">
<img id="logo" src="https://cdn.evbstatic.com/s3-s3/static/images/django/logos/eb_home_stroke-trans.png" width="154" />
<h1>
This page is <br />currently unavailable.
</h1>
<p>
The Team is currently working to return you to the service as quickly as possible.<br />
If you need to reach us immediately, please <a href='https://www.eventbrite.com/support/contact-us'>contact us</a>.
</p>
<p>
We'll keep you updated on <a href='https://www.twitter.com/eventbrite'>Twitter</a>.<br />
<a href='https://www.eventbritestatus.com/'>Eventbrite Status Page</a>
</p>
<p><font size="-2">Response code: 403</font></p>
</div>
</body>
</html>
It use to work fine before and now it like this for a couple days. I tried to create a new API Token with no success. Calling other endpoints from the API seams working fine. I also didn't hit the rate limit. Any ideas what it could be or things to try?

According to the linked Google Group Thread
Thank you for your patience. We recently made some changes to our APIs in an effort to improve platform functionality and performance. Some of these adjustments necessitated the unforeseen and immediate deprecation of one of our public Event Search APIs events/search endpoint.
Since this change was made, the team has been working hard on potential solutions for providing access to our event feed for API users that are not part of our official distribution partner program. We wanted to reach out to acknowledge the frustration you’re feeling and let you know that we will update you with more details over the coming week as we determine the viability of a potential replacement solution.
Regards,
Eventbrite.
So it looks like they've discontinued search from the public API.
Update: The Search API has been discontinued as of December 12 here

Just came across official Google Support group. Seams like internal Eventbrite issue. :(

Related

How do I crawl twitch.tv where the html body was empty upon initial http request, and contents were loaded by various scripts

I am trying to use Scrapy to crawl through stream pages on twitch. The problem is that the html request returns no useful urls. For example, with wget to twitch.tv main page, I get an empty body tag:
<body>
//some stuff
<div id='flyout'>
<div class='point'>
</div>
<div class='content'>
</div>
</div>
</body>
I understand the content was somehow loaded afterwards, but couldn't figure out how was it done. Any ideas, suggestions? Thanks!!!
open up a browser with the dev tools open as well. Click the network tab then goto twitch.tv and dive into all the requests to see which requests provide which parts of the content and narrow it down to the content you want (and given the example below, the request url will most likely be a request to some form of https://api.twitch.tv/{path to endpoint}/{name of endpoint}?{endpointarg=value}). For example:
If you want to get all the data for the featured content on the homepage you may find that instead of starting your crawl on twitch.tv, you should instead go to https://api.twitch.tv/kraken/streams/featured?limit=6&geo=US&lang=en&on_site=1, which provides nice JSON formatted data like so:
{"_links":
{"self":"https://api.twitch.tv/kraken/streams/featured?geo=US&lang=en&limit=6&offset=0",
"next":"https://api.twitch.tv/kraken/streams/featured?geo=US&lang=en&limit=6&offset=6"},
"featured":[
{"text":"<p>SNES Super Stars is a 11-day speedrun marathon devoted to the Super Nintendo Entertainment System. From March 10th-20th, watch over 200 games being beaten amazingly fast and races between some of the top speedrunners in the world!</p>\n\n<br>\n\n\n<p>Click here to watch and chat!</p>\n\n<p></p>\n",
"title":"SNES Super Stars Marathon",
"sponsored":false,
"priority":5,
"scheduled":true,
...
And you could just follow links from there. You will also have to emulate the headers for that request. So the example above won't work unless you specify a client-id in your request header which you can probably pull from the header of the original request. Every section or feature of the site probably has its own api endpoint which you may be able to access and it is also a bit easier on twitch servers because they dont have to serve up all those pictures and video, kind of a win-win. Also if you notice some of the query arguments at the end of the url, you can probably manipulate how many items you get back (limit=6).
That should get what you want although you will have to dig around for the endpoints. But, if for whatever reason you really need to dynamically process javascript and don't want to automate a browser with selenium while staying within the scrapy ecosystem, then there is also scrapinghub's splash project which integrates quite well with scrapy.

how to add custom callback URL to Coinbase

I'm using Coinbase service to dealing with Bitcoin gateway.
I know i can put callback url in the merchant settings page of my account.
But i need to update it in each order. It can be done using API. but it's so boring.
I need something like this :
Adding data-callback="custom_callback_url" in the Anchor tag.
<a class="coinbase-button"
data-code="code_here"
data-callback="custom_callback_url"
href="https://coinbase.com/checkouts/code_here">Pay With Bitcoin</a>
<script src="https://coinbase.com/assets/button.js" type="text/javascript"></script>
With coinbase's API, you will have to set the callback URL while generating the code!
There is more info on how to generate the code here: https://coinbase.com/api/doc/1.0/buttons/create.html

How to post form data to Apache Sling using a Java servlet

I am trying to POST the data from a html page and post it to a sling using a java servlet..
Note: My webapp is running in tomcat(port 8080), and my sling runs in a different port(8999).
my html is a very simple form with just one input box
<form action = "/data" method="post">
<input type="text" name="input" />
<input type="submit" name="Submit" />
</form>
and in the servlet i have received the data in the input box.
Sting name = request.getParameter("input")
I also went through to the documentation in the official docs, but didnt find anything helpful regarding this.
Any code that help me understand the post part will be helpful.
Reworked answer taking into account your question edits: it looks like what you want is to make POST requests from another Java application to Sling.
If that's correct you can use the httpclient library which is discussed in another question here, see How do I make a WebDav call using HttpClient?

Questions regarding Google site search in combination with Google API

I am trying to incorporate Google site search into my .NET MVC project and I am very confused about the documentation.
The google XML API reference makes absolutely no reference to any code or classes that can be used for the search. As a result I am retreiving the XML and parsing it manually.
However, I have also come across the Google API as well and I am not sure whether these are connected or two different things and also confused why developers.google.com makes no reference to the existence of code.google.com
So my questions are here in order to put an end to the confusion.
a) Google site search (paid service) is possible to be used with the Google API despite there being no information about that on the developer section of the XML API? Mind you, you don't need an API key for the use of Google site search.
b) Is API an entirely separate entity that requires an API key and therefore not recommended for commercial use alongside Google site search because of API restrictions that otherwise don't exist with the plain paid service?
c) What is best practice when implementing Google site search (which I understand is the paid version of Google custom search) inside a .NET MVC 4 application? To fetch the XML and parse it manually or to consume the request into de serialized objects using the API?
Currently I am doing the former but I keep wondering if I can produce better, more testable code by combining my solution with the API.
I keep finding mixed resources regarding that on the web and I am not sure which way to go.
Thanks
I can't help with the .NET best practices, but can tell something about APIs. There are 2 different APIs for Custom Search (apart from the js widget):
Older, XML API: https://developers.google.com/custom-search/docs/xml_results
Newer, JSON API: https://developers.google.com/custom-search/json-api/v1/overview
I believe the library you mentioned is for the latter.
The API key for paid site search version can be found in the Control Panel google.com/cse.
Use below steps to implement Google custom search engine in ASP.Net MVC
Add controller
public class SearchController : Controller
{
public ActionResult Search(string SearchString)
{
ViewBag.SearchString = SearchString;
ViewBag.Title = "Search";
return View("SearchResult");
}
}
Add form to take user input
<div class="searchControl">
#using (Html.BeginForm("Search", "Search", FormMethod.Get))
{
<div class="input-group">
<input type="text" name="SearchString" class="form-control" placeholder="type something and hit enter">
<span class="input-group-btn">
<input class="btn" type="submit" value="Search!"/>
</span>
</div><!-- /input-group -->
}
</div>
Add Search result page
#{
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="container"">
<div class="row">
<div class="col-md-12">
<script>
//put here your Google custom search engine script
</script>
<gcse:search>
</gcse:search>
</div>
</div>
</div>
Here is complete step by step Article to implement Google custom search engine in MVC

Best practices for adding semantics to a website

I am a bit confused about the semantics of websites. I understand that every URI should represent a ressource. I assume that all information provided by RDFa inside a webpage describes the ressource represented by the URI of that webpage. My question is: What are best practices for providing semantic data for subpages of a website.
In my case I want to create a website for a theater group called magma using RDFa with schema.org and opengraph vocabularies. Let's say I have the welcome page (http://magma.com/), a contact page (http://magma.com/contact/) and pages for individual plays (http://magma.com/play/<playid>/).
Now I would think that both the welcome page and the contact page represent the same ressource (magma) while providing different information about that ressource. The play pages however represent plays that only happen to be performed by magma. Or is it better to say that the play pages also represent magma but providing information about plays which will be performed by that group? The third option I stumbled upon is http://schema.org/WebPage. Especially subtypes like ContactPage seems to be relevant.
When it comes to implementation, where do I put the RDFa?
And finally: How will my choice change the way the website is treated by 3rd parties (google, facebook, ...)?
I realize this question is a bit blurry. To make it more concrete I will add an example that you might critizise:
<html vocab="http://schema.org/" typeof="TheaterGroup">
<head>
<meta charset="UTF-8"/>
<title>Magma - Romeo and Juliet</title>
<!-- magma sematics from a template file -->
<meta property="name" content="Magma"/>
<meta property="logo" content="/static/logo.png"/>
<link rel="home" property="url" content="http://magma.com/"/>
</head>
<body>
<h1>Romeo and Juliet</h1>
<!-- semantics of the play -->
<div typeof="CreativeWork" name="Romeo and Juliet">
...
</div>
<h2>Shows</h2>
<!-- samantics of magma events -->
<ul property="events">
<li typeof="Event"><time property="startDate">...</time></li>
...
</ul>
</body>
</html>
I understand that every URI should represent a ressource. I assume that all information provided by RDFa inside a webpage describes the ressource represented by the URI of that webpage.
Well, a HTTP URI could identify the page itself OR the thing the page is about. You can't tell if an URI identifies the page or the thing by simply looking at it.
Example (in Turtle syntax):
<http://en.wikipedia.org/wiki/The_Lord_of_the_Rings> ex:author "John Doe"
This could mean that the HTML page with the URI http://en.wikipedia.org/wiki/The_Lord_of_the_Rings is authored by "John Doe". Or it could mean that the thing described by that HTML page (→ the novel) is authored by "John Doe". Of course this is an important difference.
There are various ways to differentiate what an URI represents, and there is some dispute about it. The discussion around this is known as httpRange-14 issue. See for example the Wikipedia article Web resource.
One way is using hash URIs (see also this answer). Example: http://magma.com/play/42 could identify the page about the play, http://magma.com/play/42#play could identify the play.
Another way is using HTTP status code 303. The code 200 gives the representation of the page about the thing, the code 303 See Other gives an additional URI identifying the thing. This method is used by DBpedia:
http://dbpedia.org/resource/The_Lord_of_the_Rings represents the novel
http://dbpedia.org/page/The_Lord_of_the_Rings represents the page about the novel
(resp. http://dbpedia.org/data/The_Lord_of_the_Rings for machines)
See Choosing between 303 and Hash.
Now, when using RDFa, you can make statements about both, the page itself and the thing represented by the page. Just use the corresponding URI as subject (e.g., by using the resource attribute).
So let's say http://magma.com/#magma represents the theater group. Now you could use this URI on every page (/contact, /play/, …) to make statements about the group resp. to refer to the group.
<div resource="http://magma.com/#magma">
<span property="ex:name">Magma</span>
</div>
<div resource="http://magma.com/">
<span property="ex:name">Website of Magma</span>
</div>
I suggest that you first look at the schema.org straightforward documentation. This vocabulary is very comprehensive for your concerns and supported by the major search engines.
Here is a snippet example for you to get started, you can include this straight in an HTML page. When you speak about the performance of the play on a page you could use:
<div itemscope itemtype="http://schema.org/TheaterEvent">
<h1 itemprop="name">Romeo and Juliet</h1>
<span itemprop="location">Council Bluffs, IA, US</span>
<meta itemprop="startDate" content="2011-05-23">May 23
Buy tickets
</div>
On your contact page you could include:
<div itemscope itemtype="http://schema.org/TheaterGroup">
<span itemprop="name">Magma</span>
Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>
</div>