Skip to content

Instantly share code, notes, and snippets.

View robinhayward's full-sized avatar

Robin Hayward robinhayward

View GitHub Profile
{
{ "response" : [
{ "hex":"FF0000" }, "options": [ { "hex":"FF0001"}, { "hex":"FF0002"} ],
{ "hex":"GG0000" }, "options": [ { "hex":"FF0001"}, { "hex":"FF0002"} ]
],
"error" : { "code" : 0, "message" : "Entry saved ok" }
}
}
#import "NSNotificationCenter+RHKit.h"
@implementation NSNotificationCenter (RHKit)
- (void)addUniqueObserver:(id)observer selector:(SEL)aSelector name:(NSString *)aName object:(id)anObject {
[self removeObserver:observer name:aName object:anObject];
[self addObserver:observer selector:aSelector name:aName object:anObject];
}
@robinhayward
robinhayward / gist:3415093
Created August 21, 2012 12:46
Stream response
{
"response": {"score":[],"stream":[] },
"error": {"code":0,"message":""}
}
{
"response": {
"score":[
{"team":"Super Kings","totalover":19.5,"totalrun":112,"teamimage":"http:\/\/cdn.moshen.com\/images\/team1.jpeg","turn":"batting"},
{"team":"Indians","totalover":19.5,"totalrun":112,"teamimage":"http:\/\/cdn.moshen.com\/images\/team2.jpeg","turn":"bowling"}
],
"stream": [
{"id":299,"obj_type":"eventhrow","text":"8.3 D Bollinger to RG Sharma","hawkeye":"http:\/\/static2.iplt20.com\/iphone\/hawkeye.html?cgid=ipl2012-01"},
{"id":300,"obj_type":"endofover","text":"end of over 20 - 3 runs"},
{"id":301,"obj_type":"commentary","text":"end of over 20 - 3 runs"}
{
"response": [
{ "name":"Super King Innings","batting":[{"batter":"Lasith Maling","out":"run out (Ambati Raydud)","R":3,"B":2,"SR":150,"4":0,"6":0},{"batter":"Lasith Maling","out":"run out (Ambati Raydud)","R":3,"B":2,"SR":150,"4":0,"6":0}],"bowling":[{"bowler":"Lasith Maling","o":3.5,"r":16,"w":2,"e":0},{"bowler":"Lasith Maling","o":3.5,"r":16,"w":2,"e":0}],"totalover":19.5,"totalrun":112,"fall":"1-4 (Francois du plessis, 1.4 ov)" },
{ "name":"Super King Innings","batting":[{"batter":"Lasith Maling","out":"run out (Ambati Raydud)","R":3,"B":2,"SR":150,"4":0,"6":0},{"batter":"Lasith Maling","out":"run out (Ambati Raydud)","R":3,"B":2,"SR":150,"4":0,"6":0}],"bowling":[{"bowler":"Lasith Maling","o":3.5,"r":16,"w":2,"e":0},{"bowler":"Lasith Maling","o":3.5,"r":16,"w":2,"e":0}],"totalover":19.5,"totalrun":112,"fall":"1-4 (Francois du plessis, 1.4 ov)" }
]
}
@robinhayward
robinhayward / gist:3313605
Created August 10, 2012 11:28
Stream sample
[
{
"text":"Some free flowing text about this stream item to be displayed as plain paragraph",
"icon":"http://www.icon.com/thing.png",
"timestamp":2345678998,
"stats": [
{ "name":"A bold stat name 1","value":"15(1)" },
{ "name":"A bold stat name 2","value":"12(1)" }
]
}