"chromas" writes:
from the teehee dept
wiki.soylentnews.org:
Foreword
This is the documentation for the upcoming SoylentNews API that I'm working on. It is currently live but it's possible it may cease to be that way. In the event that it doesn't though, I want it documented so people can actually start building against it right off.
Layout
Code is arranged with methods (m=foo) being the highest order of operation, each able to perform several ops (m=foo&op=bar, m=foo&op=baz). Each op requires or allows different arguments, depending on what is being done.
Methods
The top level methods are as follows:
Operations
The operations for each method are as follows:
user ops
comment ops
latest - returns the latest 50 comments without argument or all comments since the comment id supplied in the argument "since". if "since" is not numeric, the latest 50 are returned. if since is too high, an empty json array is returned
post - posts a comment. sid, postersubj, posttype, reskey, and postercomment are required. sid may be numeric or in "14/08/07/1647258" form. preview=1 will return a json-encoded preview exactly as it would be included on the webpage for viewing. to reply to another comment, set pid = the comment to reply to's cid. I very much suggest you use a POST request here or it will be a huge pain to fill out postercomment properly and you will be limited by GET request max length. posttype is as follows: 1 Plain Old Text, 2 HTML, 3 Extrans (HTML tags to text), 4 Code reskey comes from a previous call to the m=comment&op=reskey op ten seconds are required between reskey creation and use so do a reskey creation call before allowing the user to enter data
story ops
latest - returns the latest 10 stories. optionally takes "limit" as an argument for the number of stories returned, which may range from 1-50. You may also specify "tid" as an argument. Behavior is however strange currently. If tid is the tid of a topic, you will get stories of that topic from every nexus; if tid belongs to a nexus, you will get stories of every topic within that nexus. This needs to be changed but it would require changing the main site as well.
journal ops
auth ops
login - Logs you in, duh. Takes nick and pass as mandatory arguments. Currently returns the cookie value. DO NOT USE THE COOKIE VALUE. Use the proper cookie returned in the headers as this will change to a success/failure check only soon. You should also probably do this via POST for security reasons.
Errata
Related pages
Example scripts
Usage
Syntax: ~api [%argument1%=%value1% %argument2%=%value2%] [/%element%]
There can be as many argument=value pairs as you like, and the element is optional and corresponds to a key in the json structure
~api m=user op=get_uid nick=The Mighty Buzzard /uid
The element may also contain forward-slashes that correspond to array levels, allowing you to drill down into an array structure to retrieve a specific piece of data. For example, to get the uid of the latest comment:
~api m=comment op=latest /0/uid
Original Submission
Related Stories
Testing blockquotes in an article 3 comments
In testing blockquoting, I've written martyb updated this story:
Soooooo, this would be the quoted article here. Yup, bunch of text is being quoted. Still more text. Lorum ipsum; blah, blah, and blah.
here's a nested blockquote for good measure
That should do it.
And it looks like editors can use any tag they want? here's a table with a border of 1:
| td1a | td1b |
| td2a | td2b |
This discussion was created by Fnord666 (652) for logged-in users only, but now has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
(1)
(Score: 5) by JoeMerchant on Tuesday June 02, @04:36PM (1 child)
SoylentNews is documenting a live,, in-development API that utilizes top-level methods and operations to enable external applications. The API supports fetching recent comments and stories, posting new comments, and user authentication, utilizing a URL-based syntax to query JSON data structures.
(Score: 5) by anubi on Tuesday June 02, @05:10PM
Just leaving a comment to play with.
I have a karma of 28.
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 2, Troll) by chucky on Tuesday June 02, @05:06PM (9 children)
blah blah blah & yada yada yada
(Score: 3) by Anonymous Coward on Tuesday June 02, @05:19PM (8 children)
Being this is only a test, I am gonna mark you as troll.
Dev Ops: want me to give a spam mod?
This is anubi. Posting as anon and no karma bonus.
(Score: 5) by anubi on Tuesday June 02, @05:24PM (7 children)
I gave Joe an informative mod. It registered.
I have Chucky a troll mod. It did not register.
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 4) by replic8tor on Tuesday June 02, @09:59PM (5 children)
I think this worked as intended?
The Math
When anubi Troll-moderated Chucky's comment (which had a starting score of 1) -
The database score dropped to 0 and the moderation reason was updated to Troll.
When rendering Chucky's comment for anubi, the engine added anubi's personal Troll bonus preference: Displayed Score=Database Score (0)+anubi’s Troll preference (+1)=1
Because of this, the comment's score visually stayed at 1 for anubi, giving them the impression that the mod did not register.
It works for informative but not the other way because the user anubi does not have a reason_alter_Informative preference in their profile. When anubi gave JoeMerchant's comment an Informative mod, the score went from 1 to 2, and because no preference bonus was applied, they saw the update to 2 normally.
(Score: 2) by anubi on Tuesday June 02, @11:35PM (4 children)
I was expecting to ( score :1 troll )
You are right on the math. I do have my trolls boosted. I still want to see them.
My "troll' flag was not showing for me, however the informative mod I gave to Joe does.
Clicking on the comment number acknowledged Joe's mod, but does not show the troll I gave to Chucky.
Did you fix Chucky? Where is my troll mod?
I am just flipping switches to see what happens. I submitted a useless story earlier, thought it might make something to test on. Run it, reject it, whatever, it's submitted for something submitted to test on.
After I close this, I am going to try to nail Chucky again with another troll, just to see if I can, as I tried before but the system would not let me.
How much karma do I need to get awarded a karma bonus? I am only showing 28, and apparently I am getting it?
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 4) by anubi on Tuesday June 02, @11:40PM
Ok, I just gave Chucky another troll. Nothing registered. I leave this for timestamps.
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 3) by replic8tor on Wednesday June 03, @01:01AM (2 children)
I think it works now, try troll again.
(Score: 3) by anubi on Wednesday June 03, @11:27AM
Just did. It worked this time.
I noticed Chucky had two positive moderations.
When it rendered for me, it did not indicate the last moderation received. After the troll mod, it re-rendered and did reflect the troll mod. I note I got one too, and rendered as expected.
That is what testing is all about.
Hey, I just might get a spam mod carrying on like this. If I do, could you bail me out later? Might wanna see if it's working, or maybe I spam you ? All is fair in love, war, and system testing. I picked on Chucky just because he was there. I'm gonna get picked on, too.
Actually I expect it. That's what I am here for.
My preview -submit selector pulled a disappearing act on me, but came back upon changing from portrait to landscape and back. I will be looking for how to make it happen again. Seems this happens if I type a long post without hitting preview, and the text window overwrites the space it existed in.
Android phone.
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 3) by anubi on Wednesday June 03, @11:37AM
I cut and paste from my rendering of the comment number query...
I think it works now, try troll again.
Reply to This Parent Moderate
Starting Score: 1 point
Moderation +1
Normal=1, Total=1
Total Score: 2
And noted I lost my preview button again...
I cut and paste from my rendering of the comment number query...
works now, try troll again.
Reply to This Parent Moderate
Starting Score: 1 point
Moderation +1
Normal=1, Total=1
Total Score: 2
Karma Bonus?
Again, changing modes landscape-portrait cleared it and let me submit.
The cut and paste didn't capture it.
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 3) by anubi on Wednesday June 03, @06:30PM
Re:Very valuable comment, mod it up (Score: 3)
by anubi (2828) on Tuesday June 02, @02:24PM (#31712)
I gave Joe an informative mod. It registered.
I have Chucky a troll mod. It did not register.
--
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
_----------+-+------
My scoring isn't working right.
Reply to This Parent
Starting Score: 1 point
Moderation +2
Normal=2, Total=2
Total Score: 3
"Prove all things; hold fast that which is good." [KJV: I Thessalonians 5:21]
(Score: 3, Funny) by mrpg on Tuesday June 02, @09:10PM
bye
(Score: 3) by Thexalon on Wednesday June 03, @10:50AM
I just want to test using some HTML in comments, you insensitive clod!
Documentation? Bah! Real developers use the object code.
Every task is easy if somebody else is doing it.
(Score: 2) by mrpg on Wednesday June 03, @06:45PM
p
b i strong
div