Ejemplo n.º 1
0
        public response.Profile_post add(string source_id,
                                         string file_path, string profile_reference = null,
                                         long timestamp_reception = -1,
                                         response.TrainingMetadatas training_metadatas = null)
        {
            if (training_metadatas != null)
            {
                training_metadatas.is_valid(isExp: true);
            }

            var body = new Dictionary <string, object>
            {
                { "source_id", source_id }
            };

            // timestamp as a long can not be null (-1 => null)
            if (timestamp_reception != -1)
            {
                body.Add("timestamp_reception", timestamp_reception);
            }
            RequestUtils.addIfNotNull(ref body, "profile_reference", profile_reference);
            RequestUtils.addIfNotNull(ref body, "training_metadata", training_metadatas);

            var resp = _client.post <response.Profile_post>("profile", body, file_path, false);

            return(resp.data);
        }
Ejemplo n.º 2
0
            public response.ProfileJson_post add(string source_id, response.ProfileJson profile_data,
                                                 string profile_reference = null, long timestamp_reception = -1,
                                                 response.TrainingMetadatas training_metadata = null)
            {
                var bodyParams = new Dictionary <string, object>
                {
                    { "profile_json", profile_data },
                    { "source_id", source_id }
                };

                if (timestamp_reception != -1)
                {
                    bodyParams.Add("timestamp_reception", timestamp_reception);
                }
                RequestUtils.addIfNotNull(ref bodyParams, "training_metadata", training_metadata);
                RequestUtils.addIfNotNull(ref bodyParams, "profile_reference", profile_reference);

                var resp = _client.post <response.ProfileJson_post>("profile/json", args: bodyParams);

                return(resp.data);
            }
Ejemplo n.º 3
0
            public response.ProfileJsonCheck check(response.ProfileJson profile_data, response.TrainingMetadatas training_metadata = null)
            {
                var bodyParams = new Dictionary <string, object>
                {
                    { "profile_json", profile_data },
                };

                RequestUtils.addIfNotNull(ref bodyParams, "training_metadata", training_metadata);

                var resp = _client.post <response.ProfileJsonCheck>("profile/json/check", args: bodyParams);

                return(resp.data);
            }