Talk:Use a REST API

From Rosetta Code


I think the task should specify an example set of parameters for the event query and ask for some sample output. E.g. a city and topic and the number of events and partial information for the first n events. —dchapes (talk | contribs) 00:30, 29 December 2014 (UTC)

Submitting events

I think asking for submitting of events will be problematic. Perhaps it would be better for the task author to create a single example/test RosettaCode "event" and then have a bonus task requirement to use POST 2/event_comment to add a comment to it. An example use of any POST API should be close enough to any other POST API for RosettaCode purposes. —dchapes (talk | contribs) 00:41, 29 December 2014 (UTC)

Note also the comment "Needs permission to post, which is paid." in
I think that any task which requires people pay money in order to exercise the code (another example might be credit card handling) should be treated as dubious. There's definitely a place for that kind of code, but I think that that place should be on a rigorously regulated paid access site. It's advertising for a commercial endeavor, which is fine as long as the commercial endeavor (a) contributes back, and (b) does so in an honest and clear fashion, and (c) does not whine and complain about other activities. I do not think that the person asking this task be posted here was doing the right thing. --Rdm (talk) 13:12, 29 December 2014 (UTC)
Ick, I wasn't aware of that. IMO then this whole task should be replaced by a generic "use a REST API" task against some kind of test server. If no such freely available API for testing exists then either one could be part of a separate (more involved) task or there isn't much place for this on —dchapes (talk | contribs) 18:31, 29 December 2014 (UTC)
you are right, i didn't think about that. sure, i didn't expect anyone to go out and pay, it was more like about exploring how that particular API works. yes, we should find a better example. anyone have a good suggestion? i can only offer my own API (which is not documented, and rather obscure (it is about events though :-). it would probably better to pick something popular--eMBee (talk) 16:25, 30 December 2014 (UTC)

Does cost Kill this task?

If, as Rdm has pointed out, "Posting requires a valid group which is a paid feature", and posting is an important part of the API, then the draft task should not be accepted as RC'ers don't have to pay external parties to complete tasks so far and I don't think that should change. --Paddy3118 (talk) 18:28, 29 December 2014 (UTC)


This seems a bit iffy, in my opinion. The whole "talk to an API" thing seems marginal.

First, if the task itself is so complicated that the definition of what the task is doing has to be hosted elsewhere, that seems bad. Why isn't the API documentation included in the task description?

Second, what is an "event", in the context of this task? Why isn't that documented?

Third, what is the success criteria, for talking to an external API like this? Is it acceptable for an implementation to be an utter failure? If so, what's the point? If not, how does a reader verify that the code is working?

Finally, [apparently, currently] none of the implementations are acceptable. --Rdm (talk) 01:05, 29 December 2014 (UTC)


I have made changes to the task so as to make it more generic. The task now requires creating functions to make a post and get request to the meetup API. The task now no longer requires the paid events part to finish, it is merely optional now. Thank you for the idea, dchapes.

Rdm, the Javascript Implementation is complete.

--Namanyay Goel, designer and developer. (talk) 16:33, 30 December 2014 (UTC)

(Coming back to this task, later.) The task indeed has been changed. But, also, the meetup api interfaces have been deprecated. Also, the mechanism for generating an api key (to test any of the examples) is not described here.
So... it's still iffy.
Does anyone see a way of fixing this up to be closer to what a rosettacode task needs to be? (With a fairly complete description of the task in the task description. And, ideally, stable enough that it won't need to vanish because the service gets taken down...) --Rdm (talk) 22:43, 24 January 2020 (UTC)
I don't think there is much one can do to turn this into a more palatable task. The truth is that it's been 'iffy' from the start and the fact that no one has touched it for 5 years bears that out.
The only reason I looked at it myself is because it was showing up as a Go task 'needing attention' so I felt I should try and do something. My original intention had been to try and augment dchapes' original solution with the missing functionality. However, when I realized that you needed to register to obtain an API key and, worse still, some services required a paid subscription I concluded that this wasn't going to be viable as I wouldn't be able to test the additional code and might even inadvertently break the original.
So I decided instead to add a second solution based on a small open source client library, written in Go, which I found on github. This enabled me to do something which I could be reasonably sure would work - even if I couldn't test it - and without spending a lot of time on it.
Incidentally, I'd noticed that the version 2 API was deprecated, as there's now a version 3, though I'd expect that the former should still work as otherwise they'd have removed it from the documentation altogether. The chances are that the basics haven't changed much between versions in any case.
I suppose one could ask people to update their solutions to use version 3 but I doubt whether anyone will bother or that it will attract any new solutions given what you have to do to use the API in the first place. If anyone needs to use the API for professional reasons, then the existing solutions might at least give them a start for migrating to the latest version. --PureFox (talk) 09:15, 25 January 2020 (UTC)

Petition to delete this task

A lot of comments suggested that this task is dubious. Paid services and deprecated APIs shouldn't be part of Rosetta Code. I don't see why we should promote here. I have nothing against a task that teaches how to access a (REST-)API, but please use an open project (Wikipedia, Openweathermap, Openstreetmap, just to name a few).Wieso (talk) 14:19, 16 April 2020 (UTC)

Task renamed to something more generic. I don't want to sound petulant or like I'm picking on the latest Wren submission, but of course I'm probably about to do both.
I don't think it is a good thing, to put it kindly, to have untested entries on rosettacode that nobody can run, not even the original author. I am aware there is at least one Phix entry equally at fault. I found an alternative for Phix, but not about to advocate that specific site, there are plenty of others out there. In an ideal world there would be another "Host a REST API" rosettacode task this could be tested against, even if just localhost that would do, I suppose. --Pete Lomax (talk) 14:48, 18 March 2022 (UTC)

RosettaCode MediaWikAPI

RC runs on MediaWiki, and should have it's own REST API. Why not dog food it?