The Service API module provides a framework for developers to connect with external services.

It enforces a way of working which will result in decoupled components for interacting with services that can be reused and interchanged without effecting each other.

For a basic example usage, please look at the service_api_example module in the project.

https://drupal.org/node/2152063

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/edb/2152063.git service_api

Comments

edb’s picture

Project: Service API » Drupal.org security advisory coverage applications
Component: Code » module
s_leu’s picture

  • The service API example module shows up as "Service API" in the modules list. Should be something like "Service API example"
  • README Instructions are very minimalistic, should contain more informations. Also the coding standard line length of 80 chars is exceeded
  • Not sure if it's necessary to add a separate sub module for that simple admin interface and a single menu callback. Makes sense if more stuff is added though
edb’s picture

Thanks for the feedback.

The service API example module shows up as "Service API" in the modules list. Should be something like "Service API example"

Done. Nice catch!

README Instructions are very minimalistic, should contain more informations. Also the coding standard line length of 80 chars is exceeded

Fixed the line length and added an extra paragraph explaining the structure the module enforces. The best documentation is in the example module which is referred to in the README, I could put the same documentation in the README file but it would be duplication. What do you think?

Not sure if it's necessary to add a separate sub module for that simple admin interface and a single menu callback. Makes sense if more stuff is added though

I have a plan to add more admin tools, so it is in preparation for this.

Let me know if there is anything else I need to do.

prateekjain’s picture

  • On installing the module, got the error

Fatal error: Class 'ServiceAPISource' not found in C:\wamp\www\sandbox\sites\all\modules\custom\service_api\service_api_example\service_api_example.module on line 95

  • In the .install file implementation of hook_schema looks incomplete
  • Instead of

function service_api_schema() {
  $schema['cache_service_api'] = drupal_get_schema_unprocessed('system', 'cache');
}

You have to return the $schema variable. Something like this should work -

function service_api_schema() {
  $schema = array();
  $schema['cache_service_api'] = drupal_get_schema_unprocessed('system', 'cache');
  return $schema;
}

I am unable to test it as module is not getting installed.

  • As mentioned by s_leu, README instruction looks incomplete and exceeds 80 chars per line.
  • There is .DS_store file in every sub-folder of the module. Please remove that.
  • edb’s picture

    Thanks prateekjain,

    • This was due to incorrectly defined dependencies on the service_api_example module. Fixed.
    • Fixed, thanks
    • Expanded the README with further information, do you think this is sufficient?
    • Fixed, thanks
    prateekjain’s picture

    Yes. README file looks much better now.

    PA robot’s picture

    Status: Active » Needs work

    There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxedb2152063git

    We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

    Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

    I'm a robot and this is an automated message from Project Applications Scraper.

    PA robot’s picture

    Status: Needs work » Closed (won't fix)

    Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

    I'm a robot and this is an automated message from Project Applications Scraper.