public void Run(string userName, RestDeleteUserCallback inCallback)
        {
            arg = userName;

            RestManager.Delete(this, RestManager.Request.DELETE_USER + userName, DeleteUserResponse);
            doneCallback = inCallback;
        }
        public void Run(string groupID, string updatedName, RestUpdateGroupCallback inCallback)
        {
            var reqData = new RestUpdateGroupRequestData()
            {
                name = updatedName
            };

            RestManager.Patch(this, RestManager.Request.UPDATE_GROUP + groupID, TinyJSON.Encoder.Encode(reqData, TinyJSON.EncodeOptions.NoTypeHints), OnUpdateGroupResponse);
            doneCallback = inCallback;
        }
Exemple #3
0
        public void Run(string groupName, RestCreateGroupCallback inCallback)
        {
            var data = new CreateGroupData()
            {
                name = groupName
            };

            RestManager.Post(this, RestManager.Request.CREATE_GROUP, TinyJSON.Encoder.Encode(data, TinyJSON.EncodeOptions.NoTypeHints), CreateGroupReply);
            doneCallback = inCallback;
        }
        public void Run(string groupID, RestDeleteGroupCallback inCallback)
        {
            arg = groupID;
            var data = new DeleteGroupRequestData()
            {
                groupID = groupID
            };

            RestManager.Delete(this, RestManager.Request.DELETE_GROUP + groupID, DeleteGroupResponse);
            doneCallback = inCallback;
        }
        public void Run(string spaceID, string spaceName, string ownerID, RestUpdateSpaceCallback inCallback)
        {
            var request = new RestUpdateSpaceRequestData()
            {
                name     = spaceName,
                owner_id = ownerID
            };

            RestManager.Patch(this, RestManager.Request.UPDATE_SPACE + spaceID, TinyJSON.Encoder.Encode(request, TinyJSON.EncodeOptions.NoTypeHints), UpdateSpaceResponse);
            doneCallback = inCallback;
        }
Exemple #6
0
        //public void Run(string assetID, string json, RestUpdateAssetMetadataCallback inCallback)
        //{
        //    doneCallback = inCallback;

        //    var metadata = new RestUpdateAssetMetadataRequest()
        //    {
        //        metadata = json
        //    };

        //    RestManager.Post(this, string.Format(RestManager.Request.UPDATE_ASSET_METADATA, assetID), TinyJSON.Encoder.Encode(metadata, TinyJSON.EncodeOptions.NoTypeHints), OnUpdateAssetMetadataResponse);
        //}

        public void Run(string assetID, Spaces.Core.Asset.Metadata json, RestUpdateAssetMetadataCallback inCallback)
        {
            doneCallback = inCallback;

            var metadata = new RestUpdateAssetMetadataRequest()
            {
                metadata = JsonUtility.ToJson(json)
            };

            RestManager.Post(this, string.Format(RestManager.Request.UPDATE_ASSET_METADATA, assetID), TinyJSON.Encoder.Encode(metadata, TinyJSON.EncodeOptions.NoTypeHints), OnUpdateAssetMetadataResponse);
        }
Exemple #7
0
        public void Run(string username, string password, RestLoginCallback inCallback)
        {
            var userData = new RestLoginRequestData()
            {
                username = username,
                password = password
            };

            RestManager.Post(this, RestManager.Request.USER_LOGIN, TinyJSON.Encoder.Encode(userData), LoginReply);
            doneCallback = inCallback;
        }
        public void Run(string assetID, string assetName, string assetType, string ownerID, string originalFilename, RestUpdateAssetCallback inCallback)
        {
            var request = new RestUpdateAssetRequestData()
            {
                name           = assetName,
                asset_type     = assetType,
                owner_id       = ownerID,
                orig_file_name = originalFilename
            };

            RestManager.Patch(this, RestManager.Request.UPDATE_ASSET + assetID, TinyJSON.Encoder.Encode(request, TinyJSON.EncodeOptions.NoTypeHints), UpdateAssetResponse);
            doneCallback = inCallback;
        }
        public void Run(ref Spaces.Core.Space createdSpace, string spaceName, RestCreateSpaceCallback inCallback)
        {
            space      = createdSpace;
            space.name = spaceName;

            var data = new CreateSpaceData()
            {
                name = space.name
            };

            RestManager.Post(this, RestManager.Request.CREATE_SPACE, TinyJSON.Encoder.Encode(data, TinyJSON.EncodeOptions.NoTypeHints), CreateSpaceReply);
            doneCallback = inCallback;
        }
Exemple #10
0
        public void Run(string spaceID, string assetID, RestRemoveAssetFromSpaceCallback inCallback)
        {
            var request = new RestRemoveAssetFromSpaceRequestData()
            {
                asset_id = assetID,
                space_id = spaceID
            };

            this.spaceID = spaceID;
            this.assetID = assetID;

            RestManager.Remove(this, RestManager.Request.REMOVE_ASSET_FROM_SPACE, TinyJSON.Encoder.Encode(request, TinyJSON.EncodeOptions.NoTypeHints), RemoveAssetFromSpaceResponse);
            doneCallback = inCallback;
        }
        public void Run(string spaceID, string assetID, RestAddAssetToSpaceCallback inCallback)
        {
            RestAddAssetToSpaceRequestData args = new RestAddAssetToSpaceRequestData()
            {
                space_id = spaceID,
                asset_id = assetID
            };

            this.spaceID = spaceID;
            this.assetID = assetID;

            RestManager.Put(this, RestManager.Request.ADD_ASSET_TO_SPACE, System.Text.Encoding.UTF8.GetBytes(TinyJSON.Encoder.Encode(args, TinyJSON.EncodeOptions.NoTypeHints)), AddAssetToSpaceResponse);
            doneCallback = inCallback;
        }
Exemple #12
0
        public void Run(string spaceID, string json, RestUpdateSpaceMetadataCallback inCallback)
        {
            doneCallback = inCallback;
            this.spaceID = spaceID;
            jsonMetadata = json;
            string request = string.Format(RestManager.Request.UPDATE_SPACE_METADATA, spaceID);

            var metadata = new RestUpdateSpaceMetadataRequest()
            {
                metadata = json
            };

            RestManager.Post(this, request, TinyJSON.Encoder.Encode(metadata, TinyJSON.EncodeOptions.NoTypeHints), GetSpaceMetadataResponse);
        }
Exemple #13
0
        public void Run(string userName, string eMail, string first, string last, string middle, string password, RestCreateUserCallback inCallback)
        {
            var data = new CreateUserData()
            {
                username       = userName,
                first_name     = first,
                middle_initial = middle,
                last_name      = last,
                password       = password,
                email          = eMail
            };

            RestManager.Post(this, RestManager.Request.CREATE_USER, TinyJSON.Encoder.Encode(data, TinyJSON.EncodeOptions.NoTypeHints), CreateUserReply);
            doneCallback = inCallback;
        }
        public void Run(string assetName, string assetType, string originalFileName, RestCreateAssetCallback inCallback)
        {
            asset                  = new Spaces.Core.Asset();
            asset.name             = assetName;
            asset.assetType        = assetType;
            asset.originalFileName = originalFileName;
            //createdWithRef = false;

            var args = new CreateAssetData()
            {
                asset_type     = asset.assetType,
                name           = asset.name,
                orig_file_name = asset.originalFileName
            };

            RestManager.Post(this, RestManager.Request.CREATE_ASSET, TinyJSON.Encoder.Encode(args, TinyJSON.EncodeOptions.NoTypeHints), CreateAssetReply);
            doneCallback = inCallback;
        }
Exemple #15
0
 public void Run(string uploadUrl, byte[] data, RestUploadCallback inCallback)
 {
     doneCallback = inCallback;
     RestManager.Put(this, uploadUrl, data, UploadToSpacesCloud);
 }
Exemple #16
0
 public void Run(string uploadUrl, string filePath, RestUploadCallback inCallback)
 {
     doneCallback = inCallback;
     RestManager.Put(this, uploadUrl, System.IO.File.ReadAllBytes(filePath), UploadToSpacesCloud);
 }
Exemple #17
0
 public void Run(ref List <Spaces.Core.Asset> assetList, RestGetAssetListCallback inCallback)
 {
     assets = assetList;
     RestManager.Get(this, RestManager.Request.GET_ASSET_LIST, GetAssetListReply);
     doneCallback = inCallback;
 }
Exemple #18
0
 public void Run(RestGetAssetListCallback inCallback)
 {
     RestManager.Get(this, RestManager.Request.GET_ASSET_LIST, GetAssetListReply);
     doneCallback = inCallback;
 }
Exemple #19
0
        public void Run(string userName, RestGetUserCallback inCallback)
        {
            doneCallback = inCallback;

            RestManager.Get(this, RestManager.Request.GET_USER + userName, GetUserResponse);
        }
Exemple #20
0
 public void Run(Spaces.Core.Asset requesterAsset, RestDeleteAssetCallback inCallback)
 {
     deletingAsset = requesterAsset;
     RestManager.Delete(this, RestManager.Request.DELETE_ASSET + deletingAsset.id, OnDeleteAssetResponse);
     doneCallback = inCallback;
 }
Exemple #21
0
 public void Run(string spaceID, RestGetSpaceMetadataCallback inCallback)
 {
     RestManager.Get(this, string.Format(RestManager.Request.GET_SPACE_METADATA, spaceID), GetSpaceMetadataResponse);
     doneCallback = inCallback;
 }
Exemple #22
0
 public void Run(string first, string middle, string last, string password, RestUpdateUserCallback inCallback)
 {
     RestManager.Patch(this, RestManager.Request.UPDATE_USER, "", UpdateUserResponse);
     doneCallback = inCallback;
 }
Exemple #23
0
 public void Run(string assetID, string resolution, RestGetAssetPreviewCallback inCallback)
 {
     RestManager.Get(this, string.Format(RestManager.Request.GET_ASSET_PREVIEW, assetID, resolution), GetSpaceMetadataResponse);
     doneCallback = inCallback;
 }
 public void Run(string assetID, RestGetAssetMetadataCallback inCallback)
 {
     RestManager.Get(this, string.Format(RestManager.Request.GET_ASSET_METADATA, assetID), OnGetAssetMetadataResponse);
     doneCallback = inCallback;
 }
 public void Run(string assetID, string platform, RestGetAssetDataCallback inCallback)
 {
     RestManager.Get(this, string.Format(RestManager.Request.GET_ASSET_DATA, assetID, platform), GetSpaceMetadataResponse);
     doneCallback = inCallback;
 }
Exemple #26
0
 public void Run(string assetType, string assetID, RestGetAssetUploadEndpointCallback inCallback)
 {
     RestManager.Get(this, RestManager.Request.GET_ASSET_UPLOAD_ENDPOINT + assetType + "/" + assetID, AssetUploadEndpointReply);
     doneCallback = inCallback;
 }
Exemple #27
0
 public void Run(string assetID, RestDeleteAssetCallback inCallback)
 {
     deletingAsset = null;
     RestManager.Delete(this, RestManager.Request.DELETE_ASSET + assetID, OnDeleteAssetResponse);
     doneCallback = inCallback;
 }
Exemple #28
0
        public void Run(RestLogoutCallback inCallback)
        {
            RestManager.Post(this, RestManager.Request.USER_LOGOUT, "", LogoutResponse);

            doneCallback = inCallback;
        }
 public void Run(string spaceID, RestDeleteSpaceCallback inCallback)
 {
     this.spaceID = spaceID;
     RestManager.Delete(this, RestManager.Request.DELETE_SPACE + spaceID, OnDeleteSpaceResponse);
     doneCallback = inCallback;
 }
        //public void Run(RestGetSpaceListCallback inCallback)
        //{
        //    spaces = new List<Space>();
        //    RestManager.Get(this, RestManager.Request.GET_SPACE_LIST, GetSpacesListReply);
        //    doneCallback = inCallback;
        //}

        public void Run(ref List <Spaces.Core.Space> spaceList, RestGetSpaceListCallback inCallback)
        {
            spaces = spaceList;
            RestManager.Get(this, RestManager.Request.GET_SPACE_LIST, GetSpacesListReply);
            doneCallback = inCallback;
        }