Hi guys, the majority of the API is built to be simple as anything to use. This means that you should not really struggle so let's just run through the different type of returns.
Most functions will use a true or errormessage return which means if it isn't true then it will return the error.
So if you have tried logging in and it errored the error may say could not verify credentials which just means you used the wrong username or password. If it worked then it wil return true so it is pretty simple.
There is an array return if you try user.list() this will get a list of users like:
{
"user1",
"user2",
"user3",
}
And it uses multidimensional arrays like the following to display things like all apps, which is just a huge array and it will look like this:
{
{
"array 1 1",
"array 1 2",
"array 1 3",
},
{
"array 2 1",
"array 2 2",
"array 2 3",
}
}
Okay so now that is out of the way let us explain what is what as I do not use things like post[1].appname etc, as this was a little hard at the time of making this, I will add this do not worry but for now follow this:
When you get the apps list:
{
{
"appid",
"appname",
"appdesc",
"appvers",
"appcategory",
"appurl",
"appcreator",
"appindex",
"appstatus",
}
}
AppId -> Used for deleting apps and getting the comments for an app as well as posting a comment etc.
AppName -> of course the name of the app.
AppDesc -> The app's description, would recommend using a wordwrapper when displaying this on screen.
AppVers -> This is the correct format for versioning: 1.0.0 ®. the first 3 numbers are only allowed to be 1 digit and the last letter in brackets means: alpha,beta or release version.
AppCategory -> This should be one fo the following: Game, Command, Program, Utility, OS, API, Turtle, Pocket, You can use custom may not show in others store clients though!
AppUrl -> If you are downloading an app use this link, this is a permalink and contains the raw code for the program, just readAll() and then save it.
AppIndex -> This is a unique address, please note that this will never be the same for another app, so if searching you can use this, or if you want to download a specific file liek pastebin get <8 digit code> <file name>, the index code will always be 8 characters long!
AppStatus -> This is a huge part, users should be allowed to make an app public or private, meaning private apps won't be visible and won't be downloaded, the app will be hidden until made public. the two options are: "public" or "private"
Then for the comments it comes back like so:
{
{
"commentid",
"username",
"comment",
"appid",
},
}
CommentID -> is just the id for the comment,
Username -> This is who posted the comment,
Comment -> What the comment says,
Appid -> this relates to the app, so get the app id then get the comments for that app :)/>/>/>/>/>