* closes#14
* updated readme with details of the response
* includes `url` and `code` in the response with the final URL after following redirects and the HTTP status code returned
@ -105,10 +105,15 @@ Possible errors are listed below:
"html": "Now that <ahref=\"https://twitter.com/MozillaPersona\">@MozillaPersona</a> is shutting down, the only good way to do email-based login is how <ahref=\"https://twitter.com/poetica\">@poetica</a> does it.",
"html": "Now that <ahref=\"https://twitter.com/MozillaPersona\">@MozillaPersona</a> is shutting down, the only good way to do email-based login is how <ahref=\"https://twitter.com/poetica\">@poetica</a> does it.",
"text": "Now that @MozillaPersona is shutting down, the only good way to do email-based login is how @poetica does it."
"text": "Now that @MozillaPersona is shutting down, the only good way to do email-based login is how @poetica does it."
},
},
}
},
"url": "https://aaronparecki.com/2016/01/16/11/"
}
}
```
```
#### Primary Data
The primary object on the page is returned in the `data` property. This will indicate the type of object (e.g. `entry`), and will contain the vocabulary's properties that it was able to parse from the page.
If a property supports multiple values, it will always be returned as an array. The following properties support multiple values:
If a property supports multiple values, it will always be returned as an array. The following properties support multiple values:
* in-reply-to
* in-reply-to
@ -161,6 +166,14 @@ In a future version, replies, likes, reposts, etc. of this post will be included
```
```
#### Other Properties
Other properties are returned in the response at the same level as the `data` property.
* `url` - The effective URL that the document was retrieved from. This will be the final URL after following any redirects.
* `code` - The HTTP response code returned by the URL. Typically this will be 200, but if the URL returned an alternate HTTP code that also included an h-entry (such as a 410 deleted notice with a stub h-entry), you can use this to find out that the original URL was actually deleted.
## Token API
## Token API
When verifying [Private Webmentions](https://indieweb.org/Private-Webmention#How_to_Receive_Private_Webmentions), you will need to exchange a code for an access token at the token endpoint specified by the source URL.
When verifying [Private Webmentions](https://indieweb.org/Private-Webmention#How_to_Receive_Private_Webmentions), you will need to exchange a code for an access token at the token endpoint specified by the source URL.