public static JsonApiObject CreateRegisterRequest(SharedJsonDeviceType type, string name) { Dictionary <string, dynamic> data = new Dictionary <string, dynamic> { { "device_type", type.ToString() }, { "name", name } }; return(new JsonApiObject(JsonApiContextTypes.server, JsonApiMessageTypes.request, SharedJsonRequestCode.register.ToString(), data)); }
public static JsonApiObject CreateLoginRequest(string token, SharedJsonDeviceType type) { if (token == null) { throw new ArgumentNullException(nameof(token)); } Dictionary <string, dynamic> data = new Dictionary <string, dynamic> { { "device_type", type.ToString() }, { "token", token } }; return(new JsonApiObject(JsonApiContextTypes.server, JsonApiMessageTypes.request, SharedJsonRequestCode.login.ToString(), data)); }