Update entry

POST https://api.publishme.se/1/blogs/<blogid>/entries/<entryid>/update

Description
Save changes to an entry.

URL PARAMETERS
blog_id ID of blog desired, in hex format. required
entry_id ID of entry desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
title The title of the new entry.
body Body text.
categories String containing one category or a JSON-List of categories.
tags String containing one tag or a JSON-List of tags.
publish_date Date string with UTC-offset timezone info. Most formats accepted. Example: 2012-05-29T10:05:56+02:00
commentable A boolean indicating if comments are allowed on this entryself.
draft A boolean indicating if this entry is a draft.
position a Position-JSON-Object containing lonigtude, latitude and precision (geo-location data).

RETURNS
{success: Boolean, entry: Entry}
Delete entry

POST https://api.publishme.se/1/blogs/<blogid>/entries/<entryid>/delete

Description
Delete an entry.

URL PARAMETERS
blog_id ID of blog desired, in hex format. required
entry_id ID of entry desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required

RETURNS
{success: Boolean}
Preview entry

POST https://api.publishme.se/1/blogs/<blogid>/entries/preview

Description
Create an entry preview.

URL PARAMETERS
blog_id ID of blog desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
title The title of the new entry. required
body Body text. required
categories String containing one category or a JSON-List of categories.
tags String containing one tag or a JSON-List of tags.
publish_date Date string with UTC-offset timezone info. Many formats accepted. Example: 2013-05-29T10:05:56+02:00
commentable A boolean indicating if comments are allowed on this entry.

RETURNS
{success: Boolean, preview_hash: String, preview_url: String}

EXAMPLE OUTPUT
{
  "preview_hash": "BPgpo87f-tL1I28KfrjpWhbR--ufD0Ii4BcU67awjcfAteJI,tiIQzNn",
  "preview_url": "http://api.blogg.se/_preview/BPgpo87f-tL1I28KfrjpWhbR--ufD0Ii4BcU67awjcfAteJI,tiIQzNn",
  "success": true
}
List drafts

GET https://api.publishme.se/1/blogs/<blogid>/entries/drafts

Description
Get drafted entries for blog.

URL PARAMETERS
blog_id ID of blog desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required
limit Number, limit the response to limit entries. optional
skip Number, skip response to skip'th entry. optional

RETURNS
{success: Boolean, entries: Array[Entry], entries_count: Number}

EXAMPLE OUTPUT
{
  "entries": [
    {
      "blog": "51a84568ddf2b3208abb3667",
      "body": "
\r\n
\"\"
\r\n

Bacon ipsum\u00a0dolor sit amet corned beef ham chuck salami jowl. Tail swine drumstick salami, pork hamburger rump tenderloin beef short ribs chuck. Ham hock andouille tongue beef ribs biltong chuck, prosciutto pork belly pancetta cow filet mignon jerky beef shankle. Ham turkey meatball shoulder pastrami.

\r\n

Ball tip pig biltong capicola meatball tenderloin flank brisket filet mignon ham corned beef beef ribs drumstick jowl bacon. Short loin pig shank drumstick meatloaf frankfurter. Meatball meatloaf tri-tip, brisket pork chop bresaola turducken pig bacon short loin fatback kielbasa tenderloin venison short ribs. Turkey sausage swine leberkas pastrami, sirloin spare ribs capicola boudin pig short loin. Short loin sirloin swine shankle pork belly rump, jerky prosciutto capicola t-bone fatback ham. Pastrami andouille sausage brisket swine salami. Jowl swine frankfurter spare ribs, bresaola fatback short loin jerky pig pork belly chuck pork capicola salami corned beef.

\r\n

Strip steak sausage flank ball tip, t-bone spare ribs andouille pastrami. Turkey pork loin pancetta jerky bresaola flank tail t-bone. Biltong jowl pork loin cow corned beef brisket chicken ball tip tenderloin bresaola hamburger kielbasa pastrami ham venison. Brisket salami prosciutto t-bone, leberkas shank short ribs cow. Tongue andouille salami capicola meatloaf.

\r\n
", "categories": [ { "name": "Allm\u00e4nt", "permalink": "http://api.blogg.se/category/allmant.html" } ], "comment_count": 0, "comment_count_unseen": 0, "commentable": true, "created": "2013-06-03T17:43:37+02:00", "draft": true, "excerpt": "Bacon ipsum\u00a0dolor sit amet corned beef ham chuck salami jowl. Tail swine drumstick salami, pork hamburger rump tenderloin beef short ribs chuck. Ham hock andouille tongue beef ribs biltong chuck\u2026", "id": "51acb9a9ddf2b306601a4121", "images": [ "51acb99cddf2b306046cd453" ], "permalink": "http://api.blogg.se/2013/june/bacon-ipsum.html", "position": null, "publish_date": "2013-06-03T17:43:37+02:00", "tags": [], "thumbnail_url": "https://cdn3.cdnme.se/4171920/6-3/bacon1_51acb99cddf2b306046cd453_thumb.jpg", "title": "Bacon ipsum" } ], "entries_count": 1, "success": true }
New entry

POST https://api.publishme.se/1/blogs/<blogid>/entries/new

Description
Create a new entry for blog with ID blog_id.

URL PARAMETERS
blog_id ID of blog desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
title The title of the new entry. required
body Body text. required
categories String containing one category or a JSON-List of categories.
tags String containing one tag or a JSON-List of tags.
publish_date Date string with UTC-offset timezone info. Many formats accepted. Example: 2013-05-29T10:05:56+02:00
commentable A boolean indicating if comments are allowed on this entry.
draft A boolean indicating if this entry is a draft.
position a Position-JSON-Object containing lonigtude, latitude and precision (geo-location data).

RETURNS
{success: Boolean, entry: Entry}
Get entry

GET https://api.publishme.se/1/blogs/<blogid>/entries/<entryid>

Description
Get a specific entry for a blog

URL PARAMETERS
blog_id ID of blog desired, in hex format. required
entry_id ID of entry desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required

RETURNS
{success: Boolean, entry: Entry, comments: Array[Comment]}

EXAMPLE OUTPUT
{
  "comments": [
    {
      "answer": null,
      "avatar": null,
      "avatar_large": null,
      "blog": "51a84568ddf2b3208abb3667",
      "body": "Nunc magna lorem, molestie eget ornare sed, rhoncus ac libero.",
      "created": "2013-05-31T09:10:05+02:00",
      "email": "mamama@papapapa.com",
      "entry": "51a84624ddf2b3208abb3681",
      "id": "51a84ccdddf2b3211f3ad005",
      "name": "Martin Lundberg",
      "seen": false,
      "url": "http://info.blogg.se",
      "visible": false
    }
  ],
  "entry": {
    "blog": "51a84568ddf2b3208abb3667",
    "body": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer congue leo a leo condimentum sollicitudin. Nunc aliqua

\r\n
\"\"
\r\n

m, nunc vitae placerat facilisis, metus quam aliquam dolor, dictum molestie sem nulla id libero. Praesent tortor lorem, consectetur sit amet ornare nec, laoreet a tellus. Nam eget varius lorem. Donec posuere semper felis at aliquet. Pellentesque at ultrices elit. Nunc magna lorem, molestie eget ornare sed, rhoncus ac libero.

\r\n

Vivamus faucibus mattis porta. Mauris aliquet aliquet ipsum, eu commodo augue vulputate ac. In inpharetra est. Pellentesque posuere, nisl vitae rhoncus vestibulum, nunc est consectetur odio, et fringilla erat arcu a lacus. Duis interdum laoreet dui, sed cursus turpis tincidunt id. Etiam ac nisl est, quis congue diam. Curabitur tincidunt enim a risus sagittis consectetur. Aenean porta interdum tortor, consectetur condimentum turpis consectetur mattis. Phasellus molestie ante ac nisl mollis ac luctus nulla elementum.

", "categories": [ { "name": "Allm\u00e4nt", "permalink": "http://api.blogg.se/category/allmant.html" }, { "name": "API", "permalink": "http://api.blogg.se/category/api.html" } ], "comment_count": 1, "comment_count_unseen": 1, "commentable": true, "created": "2013-05-31T08:41:40+02:00", "draft": false, "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer congue leo a leo condimentum sollicitudin. Nunc aliqua\r\n\r\nm, nunc vitae placerat facilisis, metus quam aliquam dolor, dictum molestie\u2026", "id": "51a84624ddf2b3208abb3681", "images": [ "51a845eaddf2b321772aa05c" ], "permalink": "http://api.blogg.se/2013/may/bloggse-now-has-an-api.html", "position": { "address": null, "altitude": null, "latitude": 59.297010900000004, "longitude": 18.109455699999998, "precision": 0 }, "publish_date": "2013-05-31T08:41:00+02:00", "tags": [ "api", "demo", "test" ], "thumbnail_url": "https://cdn2.cdnme.se/4171920/6-3/lipsum07_51a845eaddf2b321772aa05c_thumb.gif", "title": "Blogg.se now has an API" }, "success": true }
List entries

GET https://api.publishme.se/1/blogs/<blogid>/entries

Description
List entries for blog with ID blog_id

URL PARAMETERS
blog_id ID of blog desired, in hex format. required

GET PARAMETERS
access_token String, the user authentication token. required
limit Number, limit the response to limit elements. optional
skip Number, skip to item #skip. optional

RETURNS
{success: Boolean, entries: Array[Entry], entries_count: Number}

EXAMPLE OUTPUT
{
  "entries": [
    {
      "blog": "51a84568ddf2b3208abb3667",
      "body": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer congue leo a leo condimentum sollicitudin. Nunc aliqua

\r\n
\"\"
\r\n

m, nunc vitae placerat facilisis, metus quam aliquam dolor, dictum molestie sem nulla id libero. Praesent tortor lorem, consectetur sit amet ornare nec, laoreet a tellus. Nam eget varius lorem. Donec posuere semper felis at aliquet. Pellentesque at ultrices elit. Nunc magna lorem, molestie eget ornare sed, rhoncus ac libero.

\r\n

Vivamus faucibus mattis porta. Mauris aliquet aliquet ipsum, eu commodo augue vulputate ac. In inpharetra est. Pellentesque posuere, nisl vitae rhoncus vestibulum, nunc est consectetur odio, et fringilla erat arcu a lacus. Duis interdum laoreet dui, sed cursus turpis tincidunt id. Etiam ac nisl est, quis congue diam. Curabitur tincidunt enim a risus sagittis consectetur. Aenean porta interdum tortor, consectetur condimentum turpis consectetur mattis. Phasellus molestie ante ac nisl mollis ac luctus nulla elementum.

", "categories": [ { "name": "Allm\u00e4nt", "permalink": "http://api.blogg.se/category/allmant.html" }, { "name": "API", "permalink": "http://api.blogg.se/category/api.html" } ], "comment_count": 1, "comment_count_unseen": 1, "commentable": true, "created": "2013-05-31T08:41:40+02:00", "draft": false, "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer congue leo a leo condimentum sollicitudin. Nunc aliqua\r\n\r\nm, nunc vitae placerat facilisis, metus quam aliquam dolor, dictum molestie\u2026", "id": "51a84624ddf2b3208abb3681", "images": [ "51a845eaddf2b321772aa05c" ], "permalink": "http://api.blogg.se/2013/may/bloggse-now-has-an-api.html", "position": { "address": null, "altitude": null, "latitude": 59.297010900000004, "longitude": 18.109455699999998, "precision": 0 }, "publish_date": "2013-05-31T08:41:00+02:00", "tags": [ "api", "demo", "test" ], "thumbnail_url": "https://cdn2.cdnme.se/4171920/6-3/lipsum07_51a845eaddf2b321772aa05c_thumb.gif", "title": "Blogg.se now has an API" }, { "blog": "51a84568ddf2b3208abb3667", "body": "

Mitt f\u00f6rsta inl\u00e4gg.

", "categories": [ { "name": "Allm\u00e4nt", "permalink": "http://api.blogg.se/category/allmant.html" } ], "comment_count": 1, "comment_count_unseen": 0, "commentable": true, "created": "2013-05-31T08:38:34+02:00", "draft": false, "excerpt": "Mitt f\u00f6rsta inl\u00e4gg.", "id": "51a8456addf2b3208abb3669", "images": [], "permalink": "http://api.blogg.se/2013/may/valkommen-till-min-nya-blogg.html", "position": null, "publish_date": "2013-05-31T08:38:34+02:00", "tags": [], "thumbnail_url": null, "title": "V\u00e4lkommen till min nya blogg!" } ], "entries_count": 2, "success": true }