Posted by drupal7er on October 27, 2011 at 10:57pm
Can somebody please give instructions on how to write a simple service module for Services 3.x and Drupal 7.x? I simply cannot find any that works with D7. Anything! Just a reworked version of echo_service module would do!
At the very least please link to a working example. Thanks.
Comments
Theres a module called
Theres a module called services_test_resource in tests folder.
So Services 3.x does no
So Services 3.x does no longer implement hook_services()? I'm sorry if this is stupid, but I'm really lost with this. Also, I see no services_test_resource in tests folder. :(
http://drupalcode.org/project
http://drupalcode.org/project/services.git/tree/de24729354b48b3d8b987c67...
Also, don't forget to look in services.servers.api.php and services.services.api.php these are the best examples.
Thank you! Can you please
Thank you! Can you please explain to me the reasoning behind the CRUD model instead of arbitrary method creation? It seems I can define arbitrary methods under targeted_actions alone, what about the others?
Here's some working example
Here's some working example modules for creating a REST API with Services 3.0: http://www.blakesenftner.com/Services-3-examples
How to Change the URL of a custom service through the code.
I created a custom module for node. where I gave my end point as 'node'.
Thus my service fires on 'https://localhost/node'.
I want to change the url as 'https://services/node' with in the custom services module. So that if I change the end point to 'xyz' the service page should be fired at 'https://localhost/services/xyz' rather than 'https://localhost/xyz'.