Last active
December 17, 2015 10:58
-
-
Save eleventigers/5598167 to your computer and use it in GitHub Desktop.
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
(function() { | |
var SECTION = "date"; | |
var NOW = "now"; | |
Playtomic.Date = { | |
now: function(callback) { | |
sendAPIRequest(SECTION, NOW, dateComplete, callback); | |
} | |
}; | |
function dateComplete(callback, postdata, data, response) { | |
if(callback == null) { | |
return; | |
} | |
if(response.success == false) { | |
callback(null, response); | |
return; | |
} | |
callback(data, response); | |
} | |
}()); | |
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 UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text; | |
public class PDate | |
{ | |
private const string SECTION = "date"; | |
private const string NOW = "now"; | |
public void Now(Action<PResponse> callback) | |
{ | |
Playtomic.API.StartCoroutine(SendRequest(SECTION, NOW, callback)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment