Exemplo n.º 1
0
        private static string GetPath(ITGlueRequestTypesConfigurations ITGlueRequest, string id = "", bool Update = false)
        {
            if (Update && ITGlueRequest == ITGlueRequestTypesConfigurations.ConfigurationInterfaces)
            {
                return("/configuration_interfaces");
            }



            string path = "";

            if (ITGlueRequest == ITGlueRequestTypesConfigurations.Organisation)
            {
                path = "/organizations";
            }
            else if (ITGlueRequest == ITGlueRequestTypesConfigurations.Manufacturer)
            {
                path = "/manufacturers";
            }
            else if ((ITGlueRequest == ITGlueRequestTypesConfigurations.Model) || (ITGlueRequest == ITGlueRequestTypesConfigurations.ITGLUEModel))
            {
                path = "/models";
            }
            else if (ITGlueRequest == ITGlueRequestTypesConfigurations.Configuration)
            {
                path = "/configurations";
            }
            else if (ITGlueRequest == ITGlueRequestTypesConfigurations.ConfigurationInterfaces)
            {
                path = "/configurations/" + id + "/relationships/configuration_interfaces";
            }
            else if (ITGlueRequest == ITGlueRequestTypesConfigurations.Password)
            {
                path = "/passwords/" + id;
            }
            else if (ITGlueRequest == ITGlueRequestTypesConfigurations.Configuration2Attachment)
            {
                path = "/configurations/" + id;
            }
            return(path);
        }
Exemplo n.º 2
0
 public static string requestData(ITGlueRequestTypesConfigurations ITGlueRequest, List <(string, string)> Parameters, List <(string, string)> URLParameters, string id = "")