Mailinglist Archive: opensuse-buildservice (124 mails)

< Previous Next >
[opensuse-buildservice] Re: Any docs for development about open build service
activexml is basically two things: the HTTP implementation as part of
transport.rb and on top of that is the Node, which is parsing the XML
returned from the API into a ruby tree.

For this to work every API route needs to be mapped to a model and a
route, so you can find in config/initializers/activexml.rb e.g.

map.connect :statusmessage, 'rest:///status/messages/:id/?:limit'

This maps to app/models/statusmessage.rb, so you can use
Statusmessage.find(:id => params[:message_id])

This will then call into $APIURL/status/messages/#{params[:message_id}
and the returned XML is available in the model.

So e.g. see this example:

irb(main):003:0> Statusmessage.find(id: 1).message.msg_id
=> "1"
irb(main):004:0> Statusmessage.find(id: 1).value(:message)
=> "Now we have status messages ... watch out for notes here, if you
encounter problems."

Thanks for replying~
when I delete/create a project something else, How does the backend perl
scripts know and update the api_production tables ? Also with the xml files
? I can't follow that






-----
Go OBS
--
View this message in context:
http://opensuse.14.n6.nabble.com/Any-docs-for-development-about-open-build-service-tp4985347p4985384.html
Sent from the opensuse-buildservice mailing list archive at Nabble.com.
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups