This was an interesting idea, but no longer had any purpose and had many security flaws. Therefor, I shut it down
I have started a project I call the OpenData Project. To sum it up it is a free, open API that serves as a simple Key/Value server. The API is easy to understand, and can be accessed from anything that can make http calls. There is no signup, no registration, no fees, nothing. Just use it. I have provided a simple implementation of the API in php, but it is easily portable to any other language.
How it worksAs a user, you start by creating a new table. To do this you must pass the new query and a tablename. This can be done via GET or POST, but for simplicity sake I will only show you GET examples here. To start a new table, you would do this:
Create new tableThis will return a plaintext answer. If there were no problems it will be 3 lines. The first line is the result code. A 0 inplies there was an error, a 1 implies there was no problems. If you get a 1, as you should, the next line will be your secret key. You must save this because it is required to use your table. The third line should be the name of the table you sent to OpenData. Below is an example of a new query’s result.
1 618f1323ad3e7c7b376e1e79e13e0ee6 test
Add a new keyFrom here you can add data to your table. This can be achieved by sending the add query along with the table name, the secret key for that table, the key name, and the value you want to save.
http://kevingravier.com/opendata/api.php?q=add&name=test&secret=618f1323ad3e7c7b376e1e79e13e0ee6&key=test&value=blaThe result again will have a 1 or 0 on the first line, 1 for success and 0 for failure. Here is the result from the previous query.
1 test bla
Edit an existing keyAs you can see the request was successful and it returned the key and value. Once keys are added, you obviously can edit them. the query is almost the same as the add but just change the word add to edit.
http://kevingravier.com/opendata/api.php?q=edit&name=test&secret=618f1323ad3e7c7b376e1e79e13e0ee6&key=test&value=blablaNow the Key test has the value blabla. Here is the result from that.
1 test blabla
List all existing keysYou can see the result is the same format every time. Now lets say we want to see all the keys that are on the table test, I have added a few extras already, they were test2, and hello. You can just run the list query. Remember you still have to give the table name and secret key. key.
1 test2 test hello
View the value for a keyTo view the value of any key, just use the view query.
http://kevingravier.com/opendata/api.php?q=view&name=test&secret=618f1323ad3e7c7b376e1e79e13e0ee6&key=testWith the result:
Delete a keyTo delete a key, and its corresponding value, you can use the delete query. Lets delete the key test2.
http://kevingravier.com/opendata/api.php?q=delete&name=test&secret=618f1323ad3e7c7b376e1e79e13e0ee6&key=test2With a simple result:
Remove a tableAnd finally to remove the entire table, including the secret key associated with it, use the remove query. is:
1 test 618f1323ad3e7c7b376e1e79e13e0ee6
Handle errorsIt gives you the table name and the secret key that was linked to it. Every error is returned as follows:
I will post a list of what each error number means at a later time. I have also written a sample OpenData class you can use to access the OpenData server easily. I wrote this is php and also plan of porting it to perl and python. Here is that code:http://kevingravier.com/opendata/sample.txt. Any question, comments, or concerns can be sent to me via email: kevin at mrkmg dot com or posted as a comment here. Thanks, Kevin Gravier (MrKMG).0 error_number description of error