public static void UpdateSectorUrl(SectorObj curSector, string newUrl) { string fullURL = "sector"; RestRequest request = new RestRequest(fullURL, Method.PUT); request.AddParameter("updateurl", true); request.AddParameter("url", newUrl); request.AddParameter("sectorid", curSector.Id); apiClient.ExecuteAsync(request, null); }
public SectorObj(SectorObj master) { lowTemp = master.lowTemp; highTemp = master.highTemp; surfaceType = master.surfaceType; ownerId = master.ownerId; claimed = master.claimed; foreach (StructureObj curStruct in master.structures) { StructureObj newStruct = new StructureObj(curStruct); newStruct.sector = this; structures.Add(newStruct); } }
public static void FetchSector(long sectorId, SectorObj_callback callback) { string fullURL = "sector"; RestRequest request = new RestRequest(fullURL, Method.GET); request.AddParameter("sectorid", sectorId); apiClient.ExecuteAsync(request, (response) => { if (response.StatusCode == HttpStatusCode.OK && response.Content != "null") { SectorObj newObj = response.Content.FromJson <SectorObj>(); callback(newObj); } else if (response.StatusCode != 0) { callback(null); } }); }
public SectorPaintObj(SectorObj theSource) { this.Id = theSource.Id; this.surfaceType = theSource.surfaceType; }