Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://api.playfab.com/releaseNotes/#160822 #82

Merged
merged 23 commits into from
Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Automated pf-main build from Jenkins
  • Loading branch information
playfabjenkinsbot committed Aug 18, 2016
commit af1814f5fa6bbf56992662afe9413d1ab9a2f397
58 changes: 58 additions & 0 deletions PlayFabSDK/src/com/playfab/PlayFabAdminAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,64 @@ private static PlayFabResult<BlankResult> privateAddVirtualCurrencyTypesAsync(fi
return pfResult;
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<DeleteStoreResult>> DeleteStoreAsync(final DeleteStoreRequest request) {
return new FutureTask(new Callable<PlayFabResult<DeleteStoreResult>>() {
public PlayFabResult<DeleteStoreResult> call() throws Exception {
return privateDeleteStoreAsync(request);
}
});
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<DeleteStoreResult> DeleteStore(final DeleteStoreRequest request) {
FutureTask<PlayFabResult<DeleteStoreResult>> task = new FutureTask(new Callable<PlayFabResult<DeleteStoreResult>>() {
public PlayFabResult<DeleteStoreResult> call() throws Exception {
return privateDeleteStoreAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
private static PlayFabResult<DeleteStoreResult> privateDeleteStoreAsync(final DeleteStoreRequest request) throws Exception {
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/DeleteStore", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
task.run();
Object httpResult = task.get();
if(httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<DeleteStoreResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<DeleteStoreResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<DeleteStoreResult>>(){}.getType());
DeleteStoreResult result = resultData.data;

PlayFabResult<DeleteStoreResult> pfResult = new PlayFabResult<DeleteStoreResult>();
pfResult.Result = result;
return pfResult;
}

/**
* Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
*/
Expand Down
16 changes: 16 additions & 0 deletions PlayFabSDK/src/com/playfab/PlayFabAdminModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,22 @@ public static class DeleteContentRequest {

}

public static class DeleteStoreRequest {
/**
* catalog version of the store to delete. If null, uses the default catalog.
*/
public String CatalogVersion;
/**
* unqiue identifier for the store which is to be deleted
*/
public String StoreId;

}

public static class DeleteStoreResult {

}

public static class DeleteUsersRequest {
/**
* An array of unique PlayFab assigned ID of the user on whom the operation will be performed.
Expand Down
58 changes: 58 additions & 0 deletions PlayFabServerSDK/src/com/playfab/PlayFabAdminAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,64 @@ private static PlayFabResult<BlankResult> privateAddVirtualCurrencyTypesAsync(fi
return pfResult;
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
public static FutureTask<PlayFabResult<DeleteStoreResult>> DeleteStoreAsync(final DeleteStoreRequest request) {
return new FutureTask(new Callable<PlayFabResult<DeleteStoreResult>>() {
public PlayFabResult<DeleteStoreResult> call() throws Exception {
return privateDeleteStoreAsync(request);
}
});
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
public static PlayFabResult<DeleteStoreResult> DeleteStore(final DeleteStoreRequest request) {
FutureTask<PlayFabResult<DeleteStoreResult>> task = new FutureTask(new Callable<PlayFabResult<DeleteStoreResult>>() {
public PlayFabResult<DeleteStoreResult> call() throws Exception {
return privateDeleteStoreAsync(request);
}
});
try {
task.run();
return task.get();
} catch(Exception e) {
return null;
}
}

/**
* Deletes an existing virtual item store
*/
@SuppressWarnings("unchecked")
private static PlayFabResult<DeleteStoreResult> privateDeleteStoreAsync(final DeleteStoreRequest request) throws Exception {
if (PlayFabSettings.DeveloperSecretKey == null) throw new Exception ("Must have PlayFabSettings.DeveloperSecretKey set to call this method");

FutureTask<Object> task = PlayFabHTTP.doPost(PlayFabSettings.GetURL() + "/Admin/DeleteStore", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey);
task.run();
Object httpResult = task.get();
if(httpResult instanceof PlayFabError) {
PlayFabError error = (PlayFabError)httpResult;
if (PlayFabSettings.GlobalErrorHandler != null)
PlayFabSettings.GlobalErrorHandler.callback(error);
PlayFabResult result = new PlayFabResult<DeleteStoreResult>();
result.Error = error;
return result;
}
String resultRawJson = (String) httpResult;

PlayFabJsonSuccess<DeleteStoreResult> resultData = gson.fromJson(resultRawJson, new TypeToken<PlayFabJsonSuccess<DeleteStoreResult>>(){}.getType());
DeleteStoreResult result = resultData.data;

PlayFabResult<DeleteStoreResult> pfResult = new PlayFabResult<DeleteStoreResult>();
pfResult.Result = result;
return pfResult;
}

/**
* Retrieves the specified version of the title's catalog of virtual goods, including all defined properties
*/
Expand Down
16 changes: 16 additions & 0 deletions PlayFabServerSDK/src/com/playfab/PlayFabAdminModels.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,22 @@ public static class DeleteContentRequest {

}

public static class DeleteStoreRequest {
/**
* catalog version of the store to delete. If null, uses the default catalog.
*/
public String CatalogVersion;
/**
* unqiue identifier for the store which is to be deleted
*/
public String StoreId;

}

public static class DeleteStoreResult {

}

public static class DeleteUsersRequest {
/**
* An array of unique PlayFab assigned ID of the user on whom the operation will be performed.
Expand Down