Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d02bd27
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name = parrotbug API resource | ||
description = create a ticket on github by proxy | ||
package = Services | ||
core = 6.x | ||
php = 5.x | ||
dependencies[] = services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Provides a generic but powerful API for web services. | ||
*/ | ||
|
||
/** | ||
* implementation of hook_services_resources(). | ||
*/ | ||
function parrotbug_service_services_resources() { | ||
$resources = array(); | ||
|
||
$resources['parrotbug'] = array( | ||
'create' => array( | ||
'file' => array( | ||
'type' => 'module', | ||
'module' => 'parrotbug_service', | ||
'name' => 'parrotbug_service' | ||
), | ||
'help' => 'Creates a github issue', | ||
'callback' => '_parrotbug_service_create', | ||
'access callback' => '_parrotbug_service_access', | ||
'args' => array( | ||
array( | ||
'name' => 'title', | ||
'type' => 'string', | ||
'source' => array('param' => 'title'), | ||
'optional' => FALSE, | ||
), | ||
array( | ||
'name' => 'body', | ||
'type' => 'string', | ||
'source' => array('param' => 'body'), | ||
'optional' => FALSE, | ||
), | ||
array( | ||
'name' => 'assignee', | ||
'type' => 'string', | ||
'source' => array('param' => 'assignee'), | ||
'optional' => TRUE, | ||
'default value' => '', | ||
), | ||
array( | ||
'name' => 'tags', | ||
'type' => 'array', | ||
'source' => array('param' => 'tags'), | ||
'optional' => TRUE, | ||
'default value' => array(), | ||
), | ||
), | ||
), | ||
); | ||
|
||
return $resources; | ||
} | ||
|
||
function _parrotbug_service_create($title, $body, $assignee, $labels) { | ||
|
||
} | ||
|
||
function _parrotbug_service_access() { | ||
global $user; | ||
# XXX: something better | ||
return FALSE; | ||
} |