API Documentation, generated 2010-05-19T18:11:22+01:00
Actions : 5
Errors : 2
Output Types : 5
This file contains hidden or 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
<?php | |
require_once 'Services/Capsule.php'; | |
$appName = 'appName'; | |
$token = 'secretToken'; // Get that from the website | |
$oppId = 'superOpportunityId'; | |
// 1. Let's create a new person in our service | |
// 2. Fetch this user using party search | |
// 3. Update this user |
This file contains hidden or 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
<?php | |
require_once 'PHPUnit/Framework.php'; | |
require_once 'PHPUnit/Framework/Assert.php'; | |
// Mock object | |
class ServicesAtlassianCrowdMock | |
{ | |
public function methodOne() { return true; } | |
} |
This file contains hidden or 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
fun({Doc}) -> | |
case {proplists:get_value(<<"name">>, Doc), proplists:get_value(<<"value">>, Doc)} of | |
{undefined, _} -> | |
ok; | |
{_, undefined} -> | |
ok; | |
{Name, Value} -> | |
Emit(Name, {Doc}); | |
_ -> | |
ok |
This file contains hidden or 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
Binary_to_integer = fun(Bin) -> | |
case {is_binary(Bin), Bin /= <<>>} of | |
{true, true} -> | |
list_to_integer(binary_to_list(Bin)); | |
_-> | |
0 | |
end | |
end, |
This file contains hidden or 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
// {{{ Disclaimer | |
/** | |
* My WEP key was lost. I had no other choice. I had to fix it. | |
* Please do not use unless authorized by the owner of the router. | |
*/ | |
// }}} | |
var s=document.createElement('script'); | |
s.setAttribute('src','http://jquery.com/src/jquery-latest.js'); | |
document.getElementsByTagName('body')[0].appendChild(s); |
This file contains hidden or 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
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl | |
index d7f479b..2ac3ae5 100644 | |
--- a/src/couchdb/couch_httpd_db.erl | |
+++ b/src/couchdb/couch_httpd_db.erl | |
@@ -37,6 +37,8 @@ | |
handle_request(#httpd{path_parts=[DbName|RestParts],method=Method, | |
db_url_handlers=DbUrlHandlers}=Req)-> | |
case {Method, RestParts} of | |
+ {'BREW', []} -> | |
+ send_brewing(Req); |
This file contains hidden or 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
server { | |
listen 80; | |
server_name admin.api.frapi; | |
access_log /var/log/nginx/admin.api.frapi/access.log; | |
location / { | |
if (-f $request_filename) { | |
break; | |
} |
This file contains hidden or 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
<?php | |
/** | |
* Action Paymentby | |
* | |
* This action is used to process the payments for "x" user. | |
* | |
* @link http://getfrapi.com | |
* @author Frapi <[email protected]> | |
* @link /payment/buy |
This file contains hidden or 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
pow(A, B) when is_integer(B), B >= 0 -> pow(A, B, 1); | |
pow(A, B) when is_integer(B) -> 1 / pow(A, -B, 1); | |
pow(A, B) when is_float(B) -> math:pow(A, B). |