Difference between revisions of "SoFurry 2.0 API"

From SoFurry
Jump to: navigation, search
Line 110: Line 110:
 
       "userID":"189019",
 
       "userID":"189019",
 
       "date":"1333734740",
 
       "date":"1333734740",
      "subject":"",
 
 
       "message":"rawr? you called :3"
 
       "message":"rawr? you called :3"
 
     },
 
     },
Line 119: Line 118:
 
       "userID":"13",
 
       "userID":"13",
 
       "date":"1333729895",
 
       "date":"1333729895",
       "subject":"",
+
       "message":"Yes, I'd love that!"
      "message":"Mrrr I'd love that!"
 
 
     },
 
     },
 
     {
 
     {
Line 128: Line 126:
 
       "userID":"142337",
 
       "userID":"142337",
 
       "date":"1333729622",
 
       "date":"1333729622",
      "subject":"",
 
 
       "message":"Thanks for the favorites, mr Toumal. I wonder if we could get a picture together at some point ;-)"
 
       "message":"Thanks for the favorites, mr Toumal. I wonder if we could get a picture together at some point ;-)"
 
     },
 
     },
Line 137: Line 134:
 
       "userID":"32931",
 
       "userID":"32931",
 
       "date":"1333714929",
 
       "date":"1333714929",
      "subject":"",
 
 
       "message":"hello :3."
 
       "message":"hello :3."
 
     },
 
     },
Line 146: Line 142:
 
       "userID":"209900",
 
       "userID":"209900",
 
       "date":"1333670188",
 
       "date":"1333670188",
      "subject":"",
 
 
       "message":"thanks for the watch, and kind words!"
 
       "message":"thanks for the watch, and kind words!"
 
     }
 
     }
Line 161: Line 156:
  
 
=== Returned data ===
 
=== Returned data ===
 +
 +
{
 +
  "entries":[
 +
    {
 +
      "id":"249324",
 +
      "parentID":"-1",
 +
      "username":"Testuser11",
 +
      "userID":"57129",
 +
      "date":"1311249060",
 +
      "message":"blablablablabla"
 +
    },
 +
    {
 +
      "id":"249325",
 +
      "parentID":"249324",
 +
      "username":"Testuser11",
 +
      "userID":"57129",
 +
      "date":"1311249060",
 +
      "message":"A reply"
 +
    }
 +
  ]
 +
}

Revision as of 20:18, 6 April 2012

Getting User Profiles

Request URL

   http://api2.sofurry.com/std/getUserProfile

Parameters

* id = numerical ID of the user whose profile you want. Optional. If omitted, the system will send your own profile data.

Returned data

For anyone but yourself, you get the following data:

   {
     "username":"Toumal",
     "useralias":"toumal", (This is the url-friendly username for username.sofurry.com profile addresses)
     "userID":"13",
     "profileViewCount":"1234",
     "submissionCount":"1234",
     "submissionViewCount":"1234",
     "commentCount":"1234",
     "commentPostedCount":"1234",
     "species":"Orca",
     "gender":"1", (0=N/A, 1=Male, 2=Female, 3=Herm)
     "orientation":"0", (0=N/A, 1=Hetero, 2=Homosexual, 3=Bisexual, 4=Omnisexual)
     "mateshipStatus":"2", (0=N/A, 1=Single uninterested, 2=Single casual, 3=Single permanent, 4=Mated open, 5=Mated closed)
     "country":"Austria",
     "city":"Vienna",
     "registrationDate":"long long ago",
     "description":"Bla"
   }

For your own user (only if you're OTP-authenticated correctly) you receive additional data about your unread PMs and notifications:


   {
     "username":"Toumal",
     "useralias":"toumal", (This is the url-friendly username for username.sofurry.com profile addresses)
     "userID":"13",
     "profileViewCount":"1234",
     "submissionCount":"1234",
     "submissionViewCount":"1234",
     "commentCount":"1234",
     "commentPostedCount":"1234",
     "species":"Orca",
     "gender":"1", (0=N/A, 1=Male, 2=Female, 3=Herm)
     "orientation":"0", (0=N/A, 1=Hetero, 2=Homosexual, 3=Bisexual, 4=Omnisexual)
     "mateshipStatus":"2", (0=N/A, 1=Single uninterested, 2=Single casual, 3=Single permanent, 4=Mated open, 5=Mated closed)
     "country":"Austria",
     "city":"Vienna",
     "registrationDate":"long long ago",
     "description":"Bla"
     "unreadPMCount":"12",
     "watchlistCount":"1234",
     "notification_voteCount":1,
     "notification_watchCount":1,
     "notification_favoriteCount":0,
     "notification_friendRequestCount":0,
     "notification_commentCount":4,
     "notification_adminCommentCount":0,
     "notification_shoutCount":0,
     "notification_forumPostCount":0,
     "notification_collaborationCount":0,
     "notification_subscribedFolderCount":0,
     "notificationTotalCount":6
   }

Get Submission Details

Request URL

   http://api2.sofurry.com/std/getSubmissionDetails

Parameters

* id = numerical ID of the desired submission. Mandatory field.

Returned data

   {
     "contentType":"1", (0=story, 1=art, 2=music, 3=journal, 4=photo)
     "title":"Battle Sheep",
     "description":"This is a description Yay!
   
   \nTest test
   
   \nblablabla",
     "fileName":"Toumal - Battle Sheep.jpg",
     "fileExtension":"jpg",
     "width":"1024",
     "height":"685",
     "contentSourceUrl":"http://someurl", (URL of the full size image, if applicable)
     "previewSourceUrl":"http://someurl", (URL of the 800px preview)
     "thumbnailSourceUrl":"http://someurl" (URL of the thumbnail)
   }


Get Shouts

Request URL

   http://api2.sofurry.com/api/getShouts

Parameters

* id = numerical ID of the desired user. Defaults to own user if omitted

Returned data

{

 "entries":[
   {
     "id":"280640",
     "parentID":"-1",
     "username":"JayriAvieock",
     "userID":"189019",
     "date":"1333734740",
     "message":"rawr? you called :3"
   },
   {
     "id":"280628",
     "parentID":"280623",
     "username":"Toumal",
     "userID":"13",
     "date":"1333729895",
     "message":"Yes, I'd love that!"
   },
   {
     "id":"280623",
     "parentID":"-1",
     "username":"markshark",
     "userID":"142337",
     "date":"1333729622",
     "message":"Thanks for the favorites, mr Toumal. I wonder if we could get a picture together at some point ;-)"
   },
   {
     "id":"280542",
     "parentID":"-1",
     "username":"Rubberkitten",
     "userID":"32931",
     "date":"1333714929",
     "message":"hello :3."
   },
   {
     "id":"280381",
     "parentID":"-1",
     "username":"Fenndragon",
     "userID":"209900",
     "date":"1333670188",
     "message":"thanks for the watch, and kind words!"
   }
 ]

}

Get Comments

Request URL

   http://api2.sofurry.com/api/getComments

Parameters

* id = numerical ID of the page of which the comments should be fetched. Mandatory field.

Returned data

{

 "entries":[
   {
     "id":"249324",
     "parentID":"-1",
     "username":"Testuser11",
     "userID":"57129",
     "date":"1311249060",
     "message":"blablablablabla"
   },
   {
     "id":"249325",
     "parentID":"249324",
     "username":"Testuser11",
     "userID":"57129",
     "date":"1311249060",
     "message":"A reply"
   }
 ]

}