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
{ | |
"actions": [ | |
{ | |
"action": { | |
"assignee_id": "523636cd391ba11500000239", | |
"contact_id": "523637e1391ba11500000255", | |
"date": "2013-09-15", | |
"done": false, | |
"id": "523637e1391ba1150000025c", | |
"modified_at": "2013-09-15T22:42:41Z", |
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
#import <Foundation/Foundation.h> | |
#import <CommonCrypto/CommonDigest.h> | |
#import <CommonCrypto/CommonHMAC.h> | |
#import "NSData+Base64.h" // https://gist.github.com/Abizern/1643491 | |
@interface onepagecrmSignature : NSObject | |
+ (NSString *) returnAuthSignatureWithUID:(NSString*)UID withAPIKey:(NSString *)APIKey withTimestamp:(NSString *)timestamp withRequestMethod:(NSString *)requestMethod withRequestURL:(NSString *)requestURL; | |
+ (NSString *) returnAuthSignatureWithUID:(NSString *)UID withAPIKey:(NSString *)APIKey withTimestamp:(NSString *)timestamp withRequestMethod:(NSString *)requestMethod withRequestURL:(NSString *)requestURL withRequestBody:(NSString *)requestBody; | |
@end |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://crypto-js.googlecode.com/svn/tags/2.5.4/src/Crypto.js"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/2.5.4/src/SHA1.js"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/2.5.4/src/SHA256.js"></script> | |
<script src="http://crypto-js.googlecode.com/svn/tags/2.5.4/src/HMAC.js"></script> | |
<script type="text/javascript"> | |
onepagecrmSignature = function (UID, APIKey, timestamp, requestMethod, requestURL, requestBody) { // auth headers for requests |
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
using System; | |
using System.Text; | |
using System.Security.Cryptography; | |
using System.Diagnostics; | |
public class OnePageCRMSignature { | |
public static String calculateSignature(String UID, String APIKey, int timestamp, String requestType, String requestURL, String requestBody) | |
{ | |
byte[] decodedAPIKey = decodeBase64String( APIKey); | |
System.Console.WriteLine( "Encoded Api key: "+ APIKey +"\nDecoded Api key: "+ decodedAPIKey +"\n"); |
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
package api; | |
import java.io.*; | |
import java.net.*; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.Charset; | |
import java.security.InvalidKeyException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import javax.crypto.Mac; |
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
{ | |
"data": {}, | |
"message": "OK", | |
"status": 0, | |
"tags": { | |
"counts": { | |
"VIP": [ | |
1, | |
1 | |
], |
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
{ | |
"data": { | |
"days": 4, | |
"id": "51da904cceb9970ce9000179", | |
"name": "updated" | |
}, | |
"message": "OK", | |
"status": 0, | |
"timestamp": 1373278347 | |
} |
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
{ | |
"data": { | |
"body": "updated", | |
"cid": "51d6f57dceb99716990003c1", | |
"date": "08.07.2013", | |
"id": "51d6f580ceb99716990003d8" | |
}, | |
"message": "OK", | |
"status": 0, | |
"timestamp": 1373276883 |
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
{ | |
"data": { | |
"amount": 3000, | |
"body": "", | |
"cid": "51d6f57dceb99716990003c1", | |
"closed": null, | |
"date": "09.08.2013", | |
"exp_close": null, | |
"id": "51da8ba6ceb9970ce900010b", | |
"name": "updated", |
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
{ | |
"data": {}, | |
"message": "OK", | |
"status": 0, | |
"statuses": [ | |
{ | |
"count": 2, | |
"name": "all" | |
}, | |
{ |
NewerOlder