Skip to content

Commit f6a0c52

Browse files
author
Jevgeni Koltšin
committed
removed example code
1 parent decc654 commit f6a0c52

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

src/main/java/com/creatubbles/api/CreatubblesAPI.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,4 @@ public static String buildURL(final String endPoint) {
4545
return EndPoints.URL_BASE + endPoint;
4646
}
4747

48-
public static void main(String[] args) throws IOException {
49-
//login
50-
SignInResponse response = new SignInRequest("jevgeni.koltsin@gmail.com", "ccttbb").execute().getResponse();
51-
System.out.println(response.access_token);
52-
//create creation
53-
UploadCreationResponse uploadResponse = new UploadCreationRequest(response.access_token).execute().getResponse();
54-
//get required info for s3
55-
GetAmazonTokenResponse amazonTokenResponse = new GetAmazonTokenRequest(response.access_token).execute().getResponse();
56-
Credentials credentials = amazonTokenResponse.credentials;
57-
//TODO: last screenshot
58-
File file = new File("C:/dev/1.png");
59-
byte[] data = Files.readAllBytes(file.toPath());
60-
String fileName = System.currentTimeMillis() + "creation.png";
61-
Creation creation = uploadResponse.creation;
62-
String relativePath = creation.store_dir + "/" + fileName;
63-
//upload image
64-
new UploadS3ImageRequest(data, relativePath, credentials.access_key_id, credentials.secret_access_key, credentials.session_token)
65-
.execute().getResponse();
66-
creation.url = relativePath;
67-
//update creation(url)
68-
new UpdateCreationRequest(response.access_token, creation).execute().getResponse();
69-
System.exit(0);
70-
}
7148
}

0 commit comments

Comments
 (0)