Main Usage
Creating/Managing Apps
Using Commands
- Get
- Post
- Upload

Wrappers
PHP
Javascript Wrapper
Python Wrapper

Other stuff
Limitations

Welcome!

This is the official documention for the Screech API. It's very different from other APIs, but one key difference you'll notice is that none of the data is JSON formatted. This is due to two things:

  • I wanted to keep the API simple and easy to use, keeping it entirely within plaintext so you can easily retrieve data.
  • I didn't think about making it a json until the last minute.

The Screech API is coded entirely within PHP, and that version of that API is the main basis for any wrappers/modules that are supplied here. So I recommend you read the "Main Usage" section of the docs before anything else, and try not to skip ahead.

If you need help, my contacts are the same as the ones listed in Screech's official help page.


Creating/Managing Apps

The apps screen
The apps screen.

If you're just using the API to get basic information, such as somebody's bio or the date their account was created, you can just use the "get" api. That being said, if you're getting information from a private account, or if you're planning on using posting and uploading features, you'll need an app..

The apps page is http://www.screech.xyz/apps. Here you can see the create/edit apps you've made and manage apps that you've consented to using, as well as consent to using said apps. If you own the app, you can get the Client ID and Client secret here. You're responsible for both of these. If somebody gets a hold of these, they can do whatever they want with your app and the users that are using your app, so watch out. Both the client ID and client secret are required to run an app. The Client ID is more of a way to identify your app, and as such it's used for your user to consent to your app (take a shot everytime I say consent). http://www.screech.xyz/apps?auth=CLIENT_ID is the url you'l need to give to all users you want to use your app, obvious replacing CLIENT_ID with your app's client id. Even as the owner you'll need to authenticate yourself to use your own app using the above link.

I know these docs are convoluted as shit but let's go into some of the app's properties: App Name: The name of your app - I bet you never knew that one was coming. This one isn't too important aside from the logs. But if you're posting screeches from this app, your app name will be shown beside the Screech on most layouts as "from appname" (example screech showing this)
App Description: The description of your app. Again, not too important, but it's useful in the authentication screen.
Creator: You! This is a verication step to make sure unautherized changes to your app is much harder. You currently do not need this to use your app, only to make changes to it.
Client ID & Client Secret: Explained above.
Permissions: What your app can do. Not changable after you've created your app.
App Image: Your app's image. Also purely cosmetic.
App Link: The link to your app's homepage. When somebody posts through your app, the "from appname" thing mentioned above will link to the app's webpage.

Lastly, you can Update, Delete, and Regenerate your app here. "Update" will save any changes you made to the text fields, including the app's name and it's description. "Delete" will delete your app entirely. And "Regenerate" will regenerate your app's client id & secrets.

Using Commands

The best way to interpret the API commands are through functions:


function(arg1,arg2)

Most of the wrappers will vaguely refer to the commands this way. So for the rest of the documentation this is how we'll refer to them.

I understand this is a bit confusing, so as an example, here's how the PHP wrapper interprets a "get" command:
screech.xyz/api/v1/get.php?get=favorites&select=users&id=1

"get" is the function here, while "select" and "1" can be seen as the arguments passed. Also, every function typically requires the same two arguments passed: "id", and "select". The "select" is what you're getting, and the "id" is who/what you're getting from it from.
Some commands, even some in the "get" function, require the client id and secret of the app. Those are usually passed as "client" and "secret" accordingly. These commands may also require a user who is authenticated with the app to be passed as well; this is passed as - you guessed it - "user". We'll be referring to them accordingly.

Get

By far the simplest command here. Get does exactly what it says on the tin: gets information from the databases.

Function Selects Description Example
user "id", "username", "password", "fullname", "bio", "location", "webpage", "sibgcolor", "sibdcolor", "silcolor", "sitcolor", "bgimage", "bgcolor", "bgattachment", "bgcover", "bgstretch", "bgattachment1", "bgattachment2", "datetime", "banned", "private", "likes_replies", "likes_styles", and "likes_snow" Gets public information about a user.

If you leave the select blank, you'll get all the information (labelled) about that user, which might be helpful if you need more details

Pretty much all selects here are what they say on the tin, but some aren't so obvious.
"sibgcolor": the background color for the user's sidebar.
"sibdcolor": the border color for the user's sidebar.
"silcolor": the link color for the user's page.
"sitcolor": the general text color for the user's page.
"bgimage": the link to the background image for the user's page.
"bgcolor": the background color that is displayed under the image.
"bgattachment": the value that corresponds to whether the background is static (0) or fixed (1).
"bgstretch": the value that corresponds to whether the background is stretched (0) or not stretched (1).
"bgposition" 1 and 2 get the values that correspond to where the background is.

"bgposition1":
  • 0: Top
  • 1: Center
  • 2: Right
"bgposition2:"
  • 0: Left
  • 1: Center
  • 2: Right
"datetime": the date the account was created.
"banned": the value corresponding to whether the account is banned (0) or not (1). Currently this feature isn't fully implemented.
"private": the value corrsponding to whether the account is public (0) or private (1).
"likes_replies": the value corrsponding to whether the account likes replies on their timeline or they don't.
"likes_styles": the value corrsponding to whether the account likes seeing other people's profile styles or they don't.
"likes_snow" seasonal value corrsponding to whether the account likes seeing the snow that usually: put on the site around Christmas time. The said snow lags up said computers heavily, especially older ones, which is why this is a thing.

user(ioixd,datetime)

Gets the date that the first account (ioixd) was created.
Result
favorites "users" and "user" Gets information from the favorites table.

"users": gets all the users who favorited a certain screech
"user": gets all the screeches favoried by a certain user.

favorites(users,1)


Gets a list of users who favorited the first of Screech, which has the id of one. Result
following "follower" and "following" Gets information from the followers table.

"follower": gets all the users following a certain person.
"following": gets everybody that a certain user is following.

follower(following,formidable)

Gets a list of users who are following the user Formidable.
Result
users none Gets all the users authenticated with your app. Requires a client ID/secret.
users(clientid,secret)

Result not applicable.
screeches "timeline/screeches", "search/find", "content", "timestamp", "sentfrom", "screech_read", "username" Gets all the screeches from a certain person or query. Can also get the content from a specific id.
The first two are unique in the sense that they both have two different versions of each other.

"timeline" gets all the screeches from a certain person. "screeches" also gets that except it places the id for each screech in brackets before each screech.
"search" gets all the screeches found within Screech's search function. "find" does the same thing but it also places the id in brackets.

The next selects require a screech id rather then a username.
"content": gets the content of the defined screech.
"timestamp": gets the timestamp of a defined screech.
"sentfrom": gets the name of the app that sent the screech (i.e. "web")
"screech_read": whether or not it was read by the person it was @ed at in the "Replies" tab. This one will soon be discontinued the notification works for multiple people @ed.
"username": gets the username of the person who posted the screech.

screeches(catface,screeches)

Gets all the screeches, IDs included, from user catface.
Result
screeches(content,100)

Gets all the content from the 100th screech.
Result

Post

Also (kinda) what it says on the tin, this function makes post actions such as making Screeches.

This one uses one more argument, though: "content". This determines the content of what's being posted or edited.

Function Selects Description Example
post none Posts a screech (no shit sherlock) post(ioixd,"sans gamer speak",client_id,secret)
profile bio, location, private, webpage, bgcolor, sibgcolor, sibdcolor, sitcolor, silcolor, bgimage, bgattachment, bgcover, bgrepeat, bgposition1, bgposition2, likes_replies, likes_styles, likes_snow. Updates a part of the user's profile.

For information on what parts to what, see above
profile(ioixd,bio,"your mom",client_id,secret)
follow/unfollow user to be followed/unfollowed Follows/unfollows a user. follow(ioixd,thepotatodoc,client_id,secret)
favorite/unfavorite none Favorite/unfavorites a screech. favorite(ioixd,1,client_id,secret)
avatar none Change the avatar for a user.

Probably the most unique one in this list. In order for it to work successfully, you need to upload the base64 for the image you want to use into a raw pastebin file and then pass that through the aformentioned "content" variable.