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
private void navigateTo(Float latitude, Float longitude, int numTries) { | |
try | |
{ | |
Log("Navigating to: " + latitude + " / " + longitude + " for try #" + numTries); | |
Integer lat = (int)(latitude * 100000); | |
Integer lon = (int)(longitude * 100000); | |
//get lat/long of address. | |
SWayPoint wayPoint = new SWayPoint(); | |
wayPoint.Location = new LONGPOSITION(lon, lat); |
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
/** | |
* Your Copyright Here | |
* | |
* Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. | |
* and licensed under the Apache Public License (version 2) | |
*/ | |
#import "TibarModule.h" | |
#import "TiBase.h" | |
#import "TiHost.h" | |
#import "TiUtils.h" |
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.Collections.Generic; | |
using System.Linq; | |
using System.Configuration; | |
using Newtonsoft.Json; | |
using Housters.Schemas.Models.Account; | |
using Housters.Business.Utility.Helpers; | |
namespace Housters.Business.Services.Account.Billing { | |
public static class BalancedService { |
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
public static string PostWithAuth(string url, string requestBody = null, string method = "POST") { | |
using (WebClient client = new WebClient()) { | |
var credentials = Convert.ToBase64String(Encoding.Default.GetBytes(APIKey)); | |
client.Headers.Add(HttpRequestHeader.Authorization, credentials); | |
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");//x-www-form-urlencoded | |
if (!String.IsNullOrEmpty(requestBody)) | |
return client.UploadString(url, method, requestBody); | |
else | |
return client.UploadString(url, method); | |
} |
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
public static string PostWithAuth(string url, string requestBody = null, string method = "POST") { | |
using (WebClient client = new WebClient()) { | |
var credentials = Convert.ToBase64String(Encoding.Default.GetBytes(APIKey)); | |
client.Headers.Add(HttpRequestHeader.Authorization, credentials); | |
client.Headers.Add(HttpRequestHeader.ContentType, "application/json");//x-www-form-urlencoded | |
if (!String.IsNullOrEmpty(requestBody)) | |
return client.UploadString(url, method, requestBody); | |
else | |
return client.UploadString(url, method); | |
} |
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
public static string PostWithAuth(string url, string requestBody = null, string method = "POST") { | |
using (WebClient client = new WebClient()) { | |
var credentials = "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(APIKey + ":")); | |
client.Headers.Add(HttpRequestHeader.Authorization, credentials); | |
client.Headers.Add(HttpRequestHeader.Accept, "application/json"); | |
client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); | |
client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); | |
if (!String.IsNullOrEmpty(requestBody)) | |
return client.UploadString(url, method, requestBody); | |
else |
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
private static CreateAccountResponse CreateAccount() { | |
var url = APIUrl + "/accounts"; | |
var responseJson = WebRequestHelper.PostWithAuth(url); | |
return JsonConvert.DeserializeObject<CreateAccountResponse>(responseJson); | |
} |
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.Collections.Generic; | |
using System.Linq; | |
using System.Configuration; | |
using Newtonsoft.Json; | |
using Housters.Schemas.Models.Account; | |
using Housters.Business.Utility.Helpers; | |
using Housters.Schemas.Models.Accounting; | |
using Housters.Schemas.Models.Tenancy; | |
using Housters.Business.Services.Tenancy; |
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
public static string PostWithAuth(string url, string requestBody = null, string method = "POST") { | |
using (WebClient client = new WebClient()) { | |
var credentials = "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes(APIKey + ":")); | |
client.Headers.Add(HttpRequestHeader.Authorization, credentials); | |
client.Headers.Add(HttpRequestHeader.Accept, "application/json"); | |
client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); | |
client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); | |
if (!String.IsNullOrEmpty(requestBody)) | |
return client.UploadString(url, method, requestBody); | |
else |