We're making some improvements to the Check In API to make it more
flexible. The Check In API will now respond to the accept header so
you can request HTML, JSON or plain text. As part of these changes, we
are also deprecating the old paginated check in success screen that is
stored in detail_html. If you are currently parsing or displaying the
detail_html or the detail_text attributes in your app, you will need
to take some action by March 9th.
== BACKGROUND ==
The Check In API currently returns a JSON object. Inside this JSON
object is a detail_html attribute that contains the HTML for the check
in success screen. We'd like to move away from embedding the HTML
inside of JSON and base the response format on the request's accept
header.
== CHECK IN API AND THE ACCEPT HEADER ==
The Check In API now responds appropriately to the 'text/plain' and
'text/html' accept headers. We are also providing a JSON
representation of the check in success screen. Since the call
currently responds to to the 'application/json' accept header, you
will need to add json_only=true to the parameter list in the interim
to receive the new JSON version of the check in success screen.
The changes also apply to the Check In Test API (https://
api.gowalla.com/checkins/test). The Check In Test API now supports
'text/html', 'text/plain' and 'application/json' with the
json_only=true parameter.
You can see sample JSON/HTML/Text representations by the following
calls to the Checkin Test API:
Note that if you are requesting the new JSON version of the check in
success screen you will need to send the json_only=true parameter.
== NEW JSON RESPONSE ==
A sample JSON response is included below.
The new JSON structure differs from the old structure in a few ways.
"detail_html" and "detail_text" are no longer present. The new JSON
response contains a "components" array. Each component corresponds to
a section of the check in receipt. Each component has a type, possible
values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'.
Each component may have a heading, message, image_url and 1 or more
buttons. Buttons are meant to represent actions that the user can take
on that specific component. This is most often seen as "tweet this"
buttons when a user receives a pin. We sometimes add special buttons
to promotional sections on the receipt, for example, to request more
info on a promotion or to friend a specific Gowalla user. Components
will also have additional attributes based on their type. The pin
component will have a trip attribute with limited info on the trip.
The idea here is to provide a basic structure that could be iterated
over and rendered using the heading/message/image/buttons while also
allowing the consumer to identify each component type in order to
apply special rendering.
As part of this change, we are deprecating the old paginated html
check in screens with the orange "next" and "prev" buttons at the top
in favor of the new receipt style layout. On March 9th, we will start
returning the new receipt style html in the detail_html of the old
JSON call.
If you are relying on parsing the old HTML message stored in the
detail_html attribute and need more time to migrate, please let me
know (r...@gowalla.com) and we can continue to return the old style
html for your app until you can update your code to use the either the
HTML version or the JSON version depending on what makes the most
sense for your app.
== RECOMMENDED MIGRATION PATHS ==
Here are our recommendations based on possible use cases of the Check
In API.
Scenario: You are not parsing or displaying the detail_html from the
Check In API
Recommended path: You can safely ignore this
Scenario: You are displaying the entire html that is currently
contained in the detail_html
Recommendation: Make the call with an accept header of 'text/html' and
just display the results. If no action is taken your app will continue
to work, but the html will change to the new receipt style HTML on
March 9th.
Scenario: You are displaying the detail_text field
Recommended path: Send an accept header of 'plain/text' to get the
text representation of the check in screen. There is currently no
timeframe on when we will remove the detail_text field from the JSON
response, so you don't have to update by March 9, 2011.
Scenario: You are parsing the detail_html and displaying customized
information from the check in screen
Recommended path: Make the call with an accept header of 'application/
json' and include the json_only=true parameter. Parse the resulting
JSON and display the appropriate information.
Scenario: You are parsing the detail_html but won't be able to change
your app by March 9, 2011.
Recommended path: Let me know (r...@gowalla.com) and we can continue
returning the old detail_html for your API key until you can make the
switch.
At some point in the future, the summer at the earliest, the
detail_html and detail_text attributes will likely go away as we move
toward determining the response based on the accept header. We will
post here before we make that change.
Please let me know if you have any questions, comments or concerns. We
hope that this change gives you more flexibility with the check in
receipt screen.
Thanks,
Rob Mack
== NEW JSON CHECK IN EXAMPLE ==
{
"created_at":"2011-02-25T21:54:45Z",
"components":[
{
"buttons":[
{
"button_url":"http://gowalla.com/special_url? token=foobar",
"button_method":"post",
"button_text":"Tap for good luck"
}
],
"type":"news",
"heading":"Congrats!",
"message":"You may already be a winner."
},
{
"created_at":"2011-02-24T21:54:46Z",
"creator":{
"name":"Team Gowalla",
"image_url":"http://s3.amazonaws.com/static.gowalla.com/ users/1934-standard.jpg?1251325516",
"url":"/users/1934"
},
"type":"note",
"heading":"Team Gowalla left you a note",
"message":"Thanks for using the Gowalla API!"
},
{
"name":"Cup o' Joe",
"completed_on":"2009-10-22T19:08:26Z",
"image_url":"http://static.gowalla.com/trips/4- c1239257221d01adf574ac61cd840dfe-100.png",
"_image_url_200":"http://static.gowalla.com/trips/4- c1239257221d01adf574ac61cd840dfe-100.png",
"success_message":"You earned the Cup o' Joe Pin by checking
in at 10 coffeeshops!",
"url":"/trips/4",
"type":"pin",
"heading":[
"Challenge Completed",
"You earned the Cup o' Joe Pin by checking in at 10
coffeeshops!"
],
"trip":{
"url":"/trips/4",
"type":"challenge"
},
"issue_number":12345,
"message":"You earned the Cup o' Joe Pin by checking in at 10
coffeeshops!"
},
{
"name":"a Big Bag o' Swag",
"image_url":"http://static.gowalla.com/kinds/ 1456-2ef5deab30691d3539d6e3f590fbb94f-100.png",
"_image_url_200":"http://static.gowalla.com/kinds/ 1456-7e814487956e7ebe82efc94b8a99326a-200.png",
"url":"/items/74792",
"type":"item",
"heading":"You received a Big Bag o' Swag",
"issue_number":9,
"message":"This item has been added to your pack"
},
{
"comment":"I think I could come here every day and not tire
of it.",
"name":"My Happy Place",
"image_url":"http://static.gowalla.com/highlight_types/ 3-57680f6a2be18e3f6fdd98e46684a176-50.png",
"updated_at":"2010-07-14T00:17:11Z",
"url":"/spots/9263/highlights",
"type":"highlight",
"heading":"My Happy Place",
"highlight_type":{
"name":"My Happy Place",
"image_url":"http://static.gowalla.com/highlight_types/ 3-57680f6a2be18e3f6fdd98e46684a176-50.png",
"url":"/highlights/my-happy-place"
},
"message":"I think I could come here every day and not tire
of it.",
"user":{
"name":"Scott Raymond",
"image_url":"http://s3.amazonaws.com/static.gowalla.com/ users/1-standard.jpg?1296490509",
"url":"/users/1",
"username":"sco",
"last_name":"Raymond",
"hometown":"Austin, Texas",
"first_name":"Scott"
}
},
{
"type":"leaderboard",
"users":[
{
"name":"John Critz",
"position":1,
"image_url":"http://s3.amazonaws.com/static.gowalla.com/ users/4-standard.jpg?1268694394",
"url":"/users/4",
"checkin_count":"12"
},
{
"name":"Adam McManus",
"position":2,
"image_url":"http://s3.amazonaws.com/static.gowalla.com/ users/3-standard.jpg?1236873337",
"url":"/users/3",
"checkin_count":"5"
},
{
"name":"Keegan Jones",
"position":3,
"image_url":"http://s3.amazonaws.com/static.gowalla.com/ users/5-standard.jpg?1297871530",
"url":"/users/5",
"checkin_count":"3"
}
],
"duration_in_days":90
},
{
"type":"news",
"message":"Thanks for going out with Gowalla!"
}
],
...
While you are making changes - any chance you'll expose Tumblr and 4sq
push permissions in both /users/me (flags to indicate user ability)
and checkins (actually push to 4sq/Tumblr)? I realize the checkin
flags exist, but they aren't public (yet).
Thanks!
On Feb 25, 5:02 pm, Rob Mack <r...@robmack.com> wrote:
> We're making some improvements to the Check In API to make it more
> flexible. The Check In API will now respond to the accept header so
> you can request HTML, JSON or plain text. As part of these changes, we
> are also deprecating the old paginated check in success screen that is
> stored in detail_html. If you are currently parsing or displaying the
> detail_html or the detail_text attributes in your app, you will need
> to take some action by March 9th.
> == BACKGROUND ==
> The Check In API currently returns a JSON object. Inside this JSON
> object is a detail_html attribute that contains the HTML for the check
> in success screen. We'd like to move away from embedding the HTML
> inside of JSON and base the response format on the request's accept
> header.
> == CHECK IN API AND THE ACCEPT HEADER ==
> The Check In API now responds appropriately to the 'text/plain' and
> 'text/html' accept headers. We are also providing a JSON
> representation of the check in success screen. Since the call
> currently responds to to the 'application/json' accept header, you
> will need to add json_only=true to the parameter list in the interim
> to receive the new JSON version of the check in success screen.
> The changes also apply to the Check In Test API (https://
> api.gowalla.com/checkins/test). The Check In Test API now supports
> 'text/html', 'text/plain' and 'application/json' with the
> json_only=true parameter.
> You can see sample JSON/HTML/Text representations by the following
> calls to the Checkin Test API:
> Note that if you are requesting the new JSON version of the check in
> success screen you will need to send the json_only=true parameter.
> == NEW JSON RESPONSE ==
> A sample JSON response is included below.
> The new JSON structure differs from the old structure in a few ways.
> "detail_html" and "detail_text" are no longer present. The new JSON
> response contains a "components" array. Each component corresponds to
> a section of the check in receipt. Each component has a type, possible
> values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'.
> Each component may have a heading, message, image_url and 1 or more
> buttons. Buttons are meant to represent actions that the user can take
> on that specific component. This is most often seen as "tweet this"
> buttons when a user receives a pin. We sometimes add special buttons
> to promotional sections on the receipt, for example, to request more
> info on a promotion or to friend a specific Gowalla user. Components
> will also have additional attributes based on their type. The pin
> component will have a trip attribute with limited info on the trip.
> The idea here is to provide a basic structure that could be iterated
> over and rendered using the heading/message/image/buttons while also
> allowing the consumer to identify each component type in order to
> apply special rendering.
> As part of this change, we are deprecating the old paginated html
> check in screens with the orange "next" and "prev" buttons at the top
> in favor of the new receipt style layout. On March 9th, we will start
> returning the new receipt style html in the detail_html of the old
> JSON call.
> If you are relying on parsing the old HTML message stored in the
> detail_html attribute and need more time to migrate, please let me
> know (r...@gowalla.com) and we can continue to return the old style
> html for your app until you can update your code to use the either the
> HTML version or the JSON version depending on what makes the most
> sense for your app.
> == RECOMMENDED MIGRATION PATHS ==
> Here are our recommendations based on possible use cases of the Check
> In API.
> Scenario: You are not parsing or displaying the detail_html from the
> Check In API
> Recommended path: You can safely ignore this
> Scenario: You are displaying the entire html that is currently
> contained in the detail_html
> Recommendation: Make the call with an accept header of 'text/html' and
> just display the results. If no action is taken your app will continue
> to work, but the html will change to the new receipt style HTML on
> March 9th.
> Scenario: You are displaying the detail_text field
> Recommended path: Send an accept header of 'plain/text' to get the
> text representation of the check in screen. There is currently no
> timeframe on when we will remove the detail_text field from the JSON
> response, so you don't have to update by March 9, 2011.
> Scenario: You are parsing the detail_html and displaying customized
> information from the check in screen
> Recommended path: Make the call with an accept header of 'application/
> json' and include the json_only=true parameter. Parse the resulting
> JSON and display the appropriate information.
> Scenario: You are parsing the detail_html but won't be able to change
> your app by March 9, 2011.
> Recommended path: Let me know (r...@gowalla.com) and we can continue
> returning the old detail_html for your API key until you can make the
> switch.
> At some point in the future, the summer at the earliest, the
> detail_html and detail_text attributes will likely go away as we move
> toward determining the response based on the accept header. We will
> post here before we make that change.
> Please let me know if you have any questions, comments or concerns. We
> hope that this change gives you more flexibility with the check in
> receipt screen.
> Thanks,
> Rob Mack
> == NEW JSON CHECK IN EXAMPLE ==
> {
> "created_at":"2011-02-25T21:54:45Z",
> "components":[
> {
> "buttons":[
> {
> "button_url":"http://gowalla.com/special_url? > token=foobar",
> "button_method":"post",
> "button_text":"Tap for good luck"
> }
> ],
> "type":"news",
> "heading":"Congrats!",
> "message":"You may already be a winner."
> },
> {
> "created_at":"2011-02-24T21:54:46Z",
> "creator":{
> "name":"Team Gowalla",
> "image_url":"http://s3.amazonaws.com/static.gowalla.com/ > users/1934-standard.jpg?1251325516",
> "url":"/users/1934"
> },
> "type":"note",
> "heading":"Team Gowalla left you a note",
> "message":"Thanks for using the Gowalla API!"
> },
> {
> "name":"Cup o' Joe",
> "completed_on":"2009-10-22T19:08:26Z",
> "image_url":"http://static.gowalla.com/trips/4- > c1239257221d01adf574ac61cd840dfe-100.png",
> "_image_url_200":"http://static.gowalla.com/trips/4- > c1239257221d01adf574ac61cd840dfe-100.png",
> "success_message":"You earned the Cup o' Joe Pin by checking
> in at 10 coffeeshops!",
> "url":"/trips/4",
> "type":"pin",
> "heading":[
> "Challenge Completed",
> "You earned the Cup o' Joe Pin by checking in at 10
> coffeeshops!"
> ],
> "trip":{
> "url":"/trips/4",
> "type":"challenge"
> },
> "issue_number":12345,
> "message":"You earned the Cup o' Joe Pin by checking in at 10
> coffeeshops!"
> },
> {
> "name":"a Big Bag o' Swag",
> "image_url":"http://static.gowalla.com/kinds/ > 1456-2ef5deab30691d3539d6e3f590fbb94f-100.png",
> "_image_url_200":"http://static.gowalla.com/kinds/ > 1456-7e814487956e7ebe82efc94b8a99326a-200.png",
> "url":"/items/74792",
> "type":"item",
> "heading":"You received a Big Bag o' Swag",
> "issue_number":9,
> "message":"This item has been added to your pack"
> },
> {
> "comment":"I think I could come here every day and not tire
> of it.",
> "name":"My Happy Place",
> "image_url":"http://static.gowalla.com/highlight_types/ > 3-57680f6a2be18e3f6fdd98e46684a176-50.png",
> "updated_at":"2010-07-14T00:17:11Z",
> "url":"/spots/9263/highlights",
> "type":"highlight",
> "heading":"My Happy Place",
> "highlight_type":{
> "name":"My Happy Place",
> "image_url":"http://static.gowalla.com/highlight_types/ > 3-57680f6a2be18e3f6fdd98e46684a176-50.png",
> "url":"/highlights/my-happy-place"
> },
> "message":"I think I could come here every day and not tire
> of it.",
> "user":{
> "name":"Scott Raymond",
> "image_url":"http://s3.amazonaws.com/static.gowalla.com/ > users/1-standard.jpg?1296490509",
> "url":"/users/1",
> "username":"sco",
> "last_name":"Raymond",
>
Just wanted to thank you for the incredibly detailed announcement -
having a set time for API switchovers and the ability to email you to
get excluded from it temporarily is a really good step forward for the
Gowalla API :)
Thanks again,
Ben
On Feb 26, 10:24 pm, Todd G <tginsb...@gmail.com> wrote:
> While you are making changes - any chance you'll expose Tumblr and 4sq
> push permissions in both /users/me (flags to indicate user ability)
> and checkins (actually push to 4sq/Tumblr)? I realize the checkin
> flags exist, but they aren't public (yet).
> Thanks!
> On Feb 25, 5:02 pm, Rob Mack <r...@robmack.com> wrote:
> > Hi Everyone,
> > We're making some improvements to the Check In API to make it more
> > flexible. The Check In API will now respond to the accept header so
> > you can request HTML, JSON or plain text. As part of these changes, we
> > are also deprecating the old paginated check in success screen that is
> > stored in detail_html. If you are currently parsing or displaying the
> > detail_html or the detail_text attributes in your app, you will need
> > to take some action by March 9th.
> > == BACKGROUND ==
> > The Check In API currently returns a JSON object. Inside this JSON
> > object is a detail_html attribute that contains the HTML for the check
> > in success screen. We'd like to move away from embedding the HTML
> > inside of JSON and base the response format on the request's accept
> > header.
> > == CHECK IN API AND THE ACCEPT HEADER ==
> > The Check In API now responds appropriately to the 'text/plain' and
> > 'text/html' accept headers. We are also providing a JSON
> > representation of the check in success screen. Since the call
> > currently responds to to the 'application/json' accept header, you
> > will need to add json_only=true to the parameter list in the interim
> > to receive the new JSON version of the check in success screen.
> > The changes also apply to the Check In Test API (https://
> > api.gowalla.com/checkins/test). The Check In Test API now supports
> > 'text/html', 'text/plain' and 'application/json' with the
> > json_only=true parameter.
> > You can see sample JSON/HTML/Text representations by the following
> > calls to the Checkin Test API:
> > Note that if you are requesting the new JSON version of the check in
> > success screen you will need to send the json_only=true parameter.
> > == NEW JSON RESPONSE ==
> > A sample JSON response is included below.
> > The new JSON structure differs from the old structure in a few ways.
> > "detail_html" and "detail_text" are no longer present. The new JSON
> > response contains a "components" array. Each component corresponds to
> > a section of the check in receipt. Each component has a type, possible
> > values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'.
> > Each component may have a heading, message, image_url and 1 or more
> > buttons. Buttons are meant to represent actions that the user can take
> > on that specific component. This is most often seen as "tweet this"
> > buttons when a user receives a pin. We sometimes add special buttons
> > to promotional sections on the receipt, for example, to request more
> > info on a promotion or to friend a specific Gowalla user. Components
> > will also have additional attributes based on their type. The pin
> > component will have a trip attribute with limited info on the trip.
> > The idea here is to provide a basic structure that could be iterated
> > over and rendered using the heading/message/image/buttons while also
> > allowing the consumer to identify each component type in order to
> > apply special rendering.
> > As part of this change, we are deprecating the old paginated html
> > check in screens with the orange "next" and "prev" buttons at the top
> > in favor of the new receipt style layout. On March 9th, we will start
> > returning the new receipt style html in the detail_html of the old
> > JSON call.
> > If you are relying on parsing the old HTML message stored in the
> > detail_html attribute and need more time to migrate, please let me
> > know (r...@gowalla.com) and we can continue to return the old style
> > html for your app until you can update your code to use the either the
> > HTML version or the JSON version depending on what makes the most
> > sense for your app.
> > == RECOMMENDED MIGRATION PATHS ==
> > Here are our recommendations based on possible use cases of the Check
> > In API.
> > Scenario: You are not parsing or displaying the detail_html from the
> > Check In API
> > Recommended path: You can safely ignore this
> > Scenario: You are displaying the entire html that is currently
> > contained in the detail_html
> > Recommendation: Make the call with an accept header of 'text/html' and
> > just display the results. If no action is taken your app will continue
> > to work, but the html will change to the new receipt style HTML on
> > March 9th.
> > Scenario: You are displaying the detail_text field
> > Recommended path: Send an accept header of 'plain/text' to get the
> > text representation of the check in screen. There is currently no
> > timeframe on when we will remove the detail_text field from the JSON
> > response, so you don't have to update by March 9, 2011.
> > Scenario: You are parsing the detail_html and displaying customized
> > information from the check in screen
> > Recommended path: Make the call with an accept header of 'application/
> > json' and include the json_only=true parameter. Parse the resulting
> > JSON and display the appropriate information.
> > Scenario: You are parsing the detail_html but won't be able to change
> > your app by March 9, 2011.
> > Recommended path: Let me know (r...@gowalla.com) and we can continue
> > returning the old detail_html for your API key until you can make the
> > switch.
> > At some point in the future, the summer at the earliest, the
> > detail_html and detail_text attributes will likely go away as we move
> > toward determining the response based on the accept header. We will
> > post here before we make that change.
> > Please let me know if you have any questions, comments or concerns. We
> > hope that this change gives you more flexibility with the check in
> > receipt screen.
> > Thanks,
> > Rob Mack
> > == NEW JSON CHECK IN EXAMPLE ==
> > {
> > "created_at":"2011-02-25T21:54:45Z",
> > "components":[
> > {
> > "buttons":[
> > {
> > "button_url":"http://gowalla.com/special_url? > > token=foobar",
> > "button_method":"post",
> > "button_text":"Tap for good luck"
> > }
> > ],
> > "type":"news",
> > "heading":"Congrats!",
> > "message":"You may already be a winner."
> > },
> > {
> > "created_at":"2011-02-24T21:54:46Z",
> > "creator":{
> > "name":"Team Gowalla",
> > "image_url":"http://s3.amazonaws.com/static.gowalla.com/ > > users/1934-standard.jpg?1251325516",
> > "url":"/users/1934"
> > },
> > "type":"note",
> > "heading":"Team Gowalla left you a note",
> > "message":"Thanks for using the Gowalla API!"
> > },
> > {
> > "name":"Cup o' Joe",
> > "completed_on":"2009-10-22T19:08:26Z",
> > "image_url":"http://static.gowalla.com/trips/4- > > c1239257221d01adf574ac61cd840dfe-100.png",
> > "_image_url_200":"http://static.gowalla.com/trips/4- > > c1239257221d01adf574ac61cd840dfe-100.png",
> > "success_message":"You earned the Cup o' Joe Pin by checking
> > in at 10 coffeeshops!",
> > "url":"/trips/4",
> > "type":"pin",
> > "heading":[
> > "Challenge Completed",
> > "You earned the Cup o' Joe Pin by checking in at 10
> > coffeeshops!"
> > ],
> > "trip":{
> > "url":"/trips/4",
> > "type":"challenge"
> > },
> > "issue_number":12345,
> > "message":"You earned the Cup o' Joe Pin by checking in at 10
> > coffeeshops!"
> > },
> > {
> > "name":"a Big Bag o' Swag",
> > "image_url":"http://static.gowalla.com/kinds/ > > 1456-2ef5deab30691d3539d6e3f590fbb94f-100.png",
> > "_image_url_200":"http://static.gowalla.com/kinds/ > > 1456-7e814487956e7ebe82efc94b8a99326a-200.png",
> > "url":"/items/74792",
> > "type":"item",
> > "heading":"You received a Big Bag o' Swag",
> > "issue_number":9,
> > "message":"This item has been added to your pack"
> > },
> > {
> > "comment":"I think I could come here every day and not tire
> > of it.",
> > "name":"My Happy Place",
> > "image_url":"http://static.gowalla.com/highlight_types/ > > 3-57680f6a2be18e3f6fdd98e46684a176-50.png",
> > "updated_at":"2010-07-14T00:17:11Z",
> > "url":"/spots/9263/highlights",
> > "type":"highlight",
> >
I'm having the following problem with retrieving html from the new
checkin api.
My program currently uses the old checkin api with "accept" set to
"application/json", and I receive a json string as expected. If I
change the accept header to "text/html", I receive a NotFound error
from the server.
Am I correct in assuming that the only thing I need to change is the
accept header to get this to work?
Thanks,
-Ed
On Feb 27, 5:33 am, Ben Dodson <b...@bendodson.com> wrote:
> Just wanted to thank you for the incredibly detailed announcement -
> having a set time for API switchovers and the ability to email you to
> get excluded from it temporarily is a really good step forward for the
> Gowalla API :)
> Thanks again,
> Ben
> On Feb 26, 10:24 pm, Todd G <tginsb...@gmail.com> wrote:
> > This is awesome! Good work guys.
> > While you are making changes - any chance you'll expose Tumblr and 4sq
> > push permissions in both /users/me (flags to indicate user ability)
> > and checkins (actually push to 4sq/Tumblr)? I realize the checkin
> > flags exist, but they aren't public (yet).
> > Thanks!
> > On Feb 25, 5:02 pm, Rob Mack <r...@robmack.com> wrote:
> > > Hi Everyone,
> > > We're making some improvements to the Check In API to make it more
> > > flexible. The Check In API will now respond to the accept header so
> > > you can request HTML, JSON or plain text. As part of these changes, we
> > > are also deprecating the old paginated check in success screen that is
> > > stored in detail_html. If you are currently parsing or displaying the
> > > detail_html or the detail_text attributes in your app, you will need
> > > to take some action by March 9th.
> > > == BACKGROUND ==
> > > The Check In API currently returns a JSON object. Inside this JSON
> > > object is a detail_html attribute that contains the HTML for the check
> > > in success screen. We'd like to move away from embedding the HTML
> > > inside of JSON and base the response format on the request's accept
> > > header.
> > > == CHECK IN API AND THE ACCEPT HEADER ==
> > > The Check In API now responds appropriately to the 'text/plain' and
> > > 'text/html' accept headers. We are also providing a JSON
> > > representation of the check in success screen. Since the call
> > > currently responds to to the 'application/json' accept header, you
> > > will need to add json_only=true to the parameter list in the interim
> > > to receive the new JSON version of the check in success screen.
> > > The changes also apply to the Check In Test API (https://
> > > api.gowalla.com/checkins/test). The Check In Test API now supports
> > > 'text/html', 'text/plain' and 'application/json' with the
> > > json_only=true parameter.
> > > You can see sample JSON/HTML/Text representations by the following
> > > calls to the Checkin Test API:
> > > Note that if you are requesting the new JSON version of the check in
> > > success screen you will need to send the json_only=true parameter.
> > > == NEW JSON RESPONSE ==
> > > A sample JSON response is included below.
> > > The new JSON structure differs from the old structure in a few ways.
> > > "detail_html" and "detail_text" are no longer present. The new JSON
> > > response contains a "components" array. Each component corresponds to
> > > a section of the check in receipt. Each component has a type, possible
> > > values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'.
> > > Each component may have a heading, message, image_url and 1 or more
> > > buttons. Buttons are meant to represent actions that the user can take
> > > on that specific component. This is most often seen as "tweet this"
> > > buttons when a user receives a pin. We sometimes add special buttons
> > > to promotional sections on the receipt, for example, to request more
> > > info on a promotion or to friend a specific Gowalla user. Components
> > > will also have additional attributes based on their type. The pin
> > > component will have a trip attribute with limited info on the trip.
> > > The idea here is to provide a basic structure that could be iterated
> > > over and rendered using the heading/message/image/buttons while also
> > > allowing the consumer to identify each component type in order to
> > > apply special rendering.
> > > As part of this change, we are deprecating the old paginated html
> > > check in screens with the orange "next" and "prev" buttons at the top
> > > in favor of the new receipt style layout. On March 9th, we will start
> > > returning the new receipt style html in the detail_html of the old
> > > JSON call.
> > > If you are relying on parsing the old HTML message stored in the
> > > detail_html attribute and need more time to migrate, please let me
> > > know (r...@gowalla.com) and we can continue to return the old style
> > > html for your app until you can update your code to use the either the
> > > HTML version or the JSON version depending on what makes the most
> > > sense for your app.
> > > == RECOMMENDED MIGRATION PATHS ==
> > > Here are our recommendations based on possible use cases of the Check
> > > In API.
> > > Scenario: You are not parsing or displaying the detail_html from the
> > > Check In API
> > > Recommended path: You can safely ignore this
> > > Scenario: You are displaying the entire html that is currently
> > > contained in the detail_html
> > > Recommendation: Make the call with an accept header of 'text/html' and
> > > just display the results. If no action is taken your app will continue
> > > to work, but the html will change to the new receipt style HTML on
> > > March 9th.
> > > Scenario: You are displaying the detail_text field
> > > Recommended path: Send an accept header of 'plain/text' to get the
> > > text representation of the check in screen. There is currently no
> > > timeframe on when we will remove the detail_text field from the JSON
> > > response, so you don't have to update by March 9, 2011.
> > > Scenario: You are parsing the detail_html and displaying customized
> > > information from the check in screen
> > > Recommended path: Make the call with an accept header of 'application/
> > > json' and include the json_only=true parameter. Parse the resulting
> > > JSON and display the appropriate information.
> > > Scenario: You are parsing the detail_html but won't be able to change
> > > your app by March 9, 2011.
> > > Recommended path: Let me know (r...@gowalla.com) and we can continue
> > > returning the old detail_html for your API key until you can make the
> > > switch.
> > > At some point in the future, the summer at the earliest, the
> > > detail_html and detail_text attributes will likely go away as we move
> > > toward determining the response based on the accept header. We will
> > > post here before we make that change.
> > > Please let me know if you have any questions, comments or concerns. We
> > > hope that this change gives you more flexibility with the check in
> > > receipt screen.
> > > Thanks,
> > > Rob Mack
> > > == NEW JSON CHECK IN EXAMPLE ==
> > > {
> > > "created_at":"2011-02-25T21:54:45Z",
> > > "components":[
> > > {
> > > "buttons":[
> > > {
> > > "button_url":"http://gowalla.com/special_url? > > > token=foobar",
> > > "button_method":"post",
> > > "button_text":"Tap for good luck"
> > > }
> > > ],
> > > "type":"news",
> > > "heading":"Congrats!",
> > > "message":"You may already be a winner."
> > > },
> > > {
> > > "created_at":"2011-02-24T21:54:46Z",
> > > "creator":{
> > > "name":"Team Gowalla",
> > > "image_url":"http://s3.amazonaws.com/static.gowalla.com/ > > > users/1934-standard.jpg?1251325516",
> > > "url":"/users/1934"
> > > },
> > > "type":"note",
> > > "heading":"Team Gowalla left you a note",
> > > "message":"Thanks for using the Gowalla API!"
> > > },
> > > {
> > > "name":"Cup o' Joe",
> > > "completed_on":"2009-10-22T19:08:26Z",
> > > "image_url":"http://static.gowalla.com/trips/4- > > > c1239257221d01adf574ac61cd840dfe-100.png",
> > > "_image_url_200":"http://static.gowalla.com/trips/4- > > > c1239257221d01adf574ac61cd840dfe-100.png",
> > > "success_message":"You earned the Cup o' Joe Pin by checking
> > > in at 10 coffeeshops!",
> > > "url":"/trips/4",
> > > "type":"pin",
> > > "heading":[
> > > "Challenge Completed",
> > > "You earned the Cup o' Joe Pin by checking in at 10
> > > coffeeshops!"
> > > ],
> > > "trip":{
> > > "url":"/trips/4",
> > > "type":"challenge"
> > > },
> > > "issue_number":12345,
> > > "message":"You earned the Cup o' Joe Pin by checking in at 10
> > > coffeeshops!"
> > > },
> > > {
> > > "name":"a Big Bag o' Swag",
> > > "image_url":"http://static.gowalla.com/kinds/
I have started using the new json_only mode on footfeed.com and it is working well so far. I'm noticing a new type of "component" that was not in this original spec: the "recent_friends" that goes something like: (not valid json but you get the idea)
I was wondering if we can get the "component_type" changed to "type" to be consistent with the other components and this part of the "test" checkin response please?
On Tue, Mar 22, 2011 at 3:45 PM, E <kxc...@gmail.com> wrote: > Hello,
> I'm having the following problem with retrieving html from the new > checkin api.
> My program currently uses the old checkin api with "accept" set to > "application/json", and I receive a json string as expected. If I > change the accept header to "text/html", I receive a NotFound error > from the server.
> Am I correct in assuming that the only thing I need to change is the > accept header to get this to work?
> Thanks, > -Ed
> On Feb 27, 5:33 am, Ben Dodson <b...@bendodson.com> wrote: > > Hi Rob,
> > Just wanted to thank you for the incredibly detailed announcement - > > having a set time for API switchovers and the ability to email you to > > get excluded from it temporarily is a really good step forward for the > > Gowalla API :)
> > Thanks again,
> > Ben
> > On Feb 26, 10:24 pm, Todd G <tginsb...@gmail.com> wrote:
> > > This is awesome! Good work guys.
> > > While you are making changes - any chance you'll expose Tumblr and 4sq > > > push permissions in both /users/me (flags to indicate user ability) > > > and checkins (actually push to 4sq/Tumblr)? I realize the checkin > > > flags exist, but they aren't public (yet).
> > > Thanks!
> > > On Feb 25, 5:02 pm, Rob Mack <r...@robmack.com> wrote:
> > > > Hi Everyone,
> > > > We're making some improvements to the Check In API to make it more > > > > flexible. The Check In API will now respond to the accept header so > > > > you can request HTML, JSON or plain text. As part of these changes, > we > > > > are also deprecating the old paginated check in success screen that > is > > > > stored in detail_html. If you are currently parsing or displaying the > > > > detail_html or the detail_text attributes in your app, you will need > > > > to take some action by March 9th.
> > > > == BACKGROUND ==
> > > > The Check In API currently returns a JSON object. Inside this JSON > > > > object is a detail_html attribute that contains the HTML for the > check > > > > in success screen. We'd like to move away from embedding the HTML > > > > inside of JSON and base the response format on the request's accept > > > > header.
> > > > == CHECK IN API AND THE ACCEPT HEADER ==
> > > > The Check In API now responds appropriately to the 'text/plain' and > > > > 'text/html' accept headers. We are also providing a JSON > > > > representation of the check in success screen. Since the call > > > > currently responds to to the 'application/json' accept header, you > > > > will need to add json_only=true to the parameter list in the interim > > > > to receive the new JSON version of the check in success screen.
> > > > The changes also apply to the Check In Test API (https:// > > > > api.gowalla.com/checkins/test). The Check In Test API now supports > > > > 'text/html', 'text/plain' and 'application/json' with the > > > > json_only=true parameter.
> > > > You can see sample JSON/HTML/Text representations by the following > > > > calls to the Checkin Test API:
> > > > Note that if you are requesting the new JSON version of the check in > > > > success screen you will need to send the json_only=true parameter.
> > > > == NEW JSON RESPONSE ==
> > > > A sample JSON response is included below.
> > > > The new JSON structure differs from the old structure in a few ways. > > > > "detail_html" and "detail_text" are no longer present. The new JSON > > > > response contains a "components" array. Each component corresponds to > > > > a section of the check in receipt. Each component has a type, > possible > > > > values are 'note', 'pin', 'item', 'highlight', 'leaderboard', 'news'. > > > > Each component may have a heading, message, image_url and 1 or more > > > > buttons. Buttons are meant to represent actions that the user can > take > > > > on that specific component. This is most often seen as "tweet this" > > > > buttons when a user receives a pin. We sometimes add special buttons > > > > to promotional sections on the receipt, for example, to request more > > > > info on a promotion or to friend a specific Gowalla user. Components > > > > will also have additional attributes based on their type. The pin > > > > component will have a trip attribute with limited info on the trip. > > > > The idea here is to provide a basic structure that could be iterated > > > > over and rendered using the heading/message/image/buttons while also > > > > allowing the consumer to identify each component type in order to > > > > apply special rendering.
> > > > As part of this change, we are deprecating the old paginated html > > > > check in screens with the orange "next" and "prev" buttons at the top > > > > in favor of the new receipt style layout. On March 9th, we will start > > > > returning the new receipt style html in the detail_html of the old > > > > JSON call.
> > > > If you are relying on parsing the old HTML message stored in the > > > > detail_html attribute and need more time to migrate, please let me > > > > know (r...@gowalla.com) and we can continue to return the old style > > > > html for your app until you can update your code to use the either > the > > > > HTML version or the JSON version depending on what makes the most > > > > sense for your app.
> > > > == RECOMMENDED MIGRATION PATHS ==
> > > > Here are our recommendations based on possible use cases of the Check > > > > In API.
> > > > Scenario: You are not parsing or displaying the detail_html from the > > > > Check In API > > > > Recommended path: You can safely ignore this
> > > > Scenario: You are displaying the entire html that is currently > > > > contained in the detail_html > > > > Recommendation: Make the call with an accept header of 'text/html' > and > > > > just display the results. If no action is taken your app will > continue > > > > to work, but the html will change to the new receipt style HTML on > > > > March 9th.
> > > > Scenario: You are displaying the detail_text field > > > > Recommended path: Send an accept header of 'plain/text' to get the > > > > text representation of the check in screen. There is currently no > > > > timeframe on when we will remove the detail_text field from the JSON > > > > response, so you don't have to update by March 9, 2011.
> > > > Scenario: You are parsing the detail_html and displaying customized > > > > information from the check in screen > > > > Recommended path: Make the call with an accept header of > 'application/ > > > > json' and include the json_only=true parameter. Parse the resulting > > > > JSON and display the appropriate information.
> > > > Scenario: You are parsing the detail_html but won't be able to change > > > > your app by March 9, 2011. > > > > Recommended path: Let me know (r...@gowalla.com) and we can continue > > > > returning the old detail_html for your API key until you can make the > > > > switch.
> > > > At some point in the future, the summer at the earliest, the > > > > detail_html and detail_text attributes will likely go away as we move > > > > toward determining the response based on the accept header. We will > > > > post here before we make that change.
> > > > Please let me know if you have any questions, comments or concerns. > We > > > > hope that this change gives you more flexibility with the check in > > > > receipt screen.