Beispiel #1
0
        public string GetUuidBy(int module, string id, int version)
        {
            //Returns the same as /module/{module}/{id} but it fitlers on version
            var request = new RestRequest("/module/{module}/{id}/{version}", Method.GET);

            request.AddUrlSegment("module", module);
            request.AddUrlSegment("id", id);
            request.AddUrlSegment("version", version);
            var        response             = client.Execute(request).Content;
            UuidOutput deserializedResponse = JsonConvert.DeserializeObject <UuidOutput>(response);

            return(response);
        }
Beispiel #2
0
        public string GetUuidBy(int module, string id)
        {
            //Returns the UUID of a module and it's id
            var request = new RestRequest("/module/{module}/{id}", Method.GET);

            request.AddUrlSegment("module", module);
            request.AddUrlSegment("id", id);
            var        response             = client.Execute(request).Content;
            UuidOutput deserializedResponse = JsonConvert.DeserializeObject <UuidOutput>(response);
            string     uuid = deserializedResponse.uuid;

            return(uuid);
        }
Beispiel #3
0
        public string PutCreateUUID(string id)
        {
            //Create a new UUID for the module and it's ID & version
            var request = new RestRequest("/module/{module}/{id}/{version}", Method.PUT);

            request.AddUrlSegment("module", 7);
            request.AddUrlSegment("id", id);
            request.AddUrlSegment("version", 1);
            var        response             = client.Execute(request).Content;
            UuidOutput deserializedResponse = JsonConvert.DeserializeObject <UuidOutput>(response);
            string     uuid = deserializedResponse.uuid;

            return(uuid);
        }