Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 85dfece

Browse files
SynapticloopSynapticloop
authored andcommitted
Merge branch 'master' into large-file-support
Conflicts: src/main/java/synapticloop/b2/request/B2CreateBucketRequest.java src/main/java/synapticloop/b2/request/B2DeleteBucketRequest.java src/main/java/synapticloop/b2/request/B2DeleteFileVersionRequest.java src/main/java/synapticloop/b2/request/B2GetFileInfoRequest.java src/main/java/synapticloop/b2/request/B2GetUploadUrlRequest.java src/main/java/synapticloop/b2/request/B2HideFileRequest.java src/main/java/synapticloop/b2/request/B2ListBucketsRequest.java src/main/java/synapticloop/b2/request/B2ListFileNamesRequest.java src/main/java/synapticloop/b2/request/B2ListFileVersionsRequest.java src/main/java/synapticloop/b2/request/B2UpdateBucketRequest.java src/main/java/synapticloop/b2/request/B2UploadFileRequest.java src/main/java/synapticloop/b2/request/BaseB2Request.java src/main/java/synapticloop/b2/response/B2FileResponse.java src/main/java/synapticloop/b2/response/BaseB2Response.java
2 parents 20964ca + 2d4b3ea commit 85dfece

File tree

56 files changed

+2441
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2441
-1135
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ gradle-app.setting
1515
### Eclipse ###
1616
*.pydevproject
1717
.metadata
18-
.gradle
1918
bin/
2019
tmp/
2120
*.tmp

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/synapticloop/backblaze-b2-java-api.svg?branch=master)](https://travis-ci.org/synapticloop/backblaze-b2-java-api)
1+
[![Build Status](https://travis-ci.org/synapticloop/backblaze-b2-java-api.svg?branch=master)](https://travis-ci.org/synapticloop/backblaze-b2-java-api) [![Download](https://api.bintray.com/packages/synapticloop/maven/backblaze-b2-java-api/images/download.svg) ](https://bintray.com/synapticloop/maven/backblaze-b2-java-api/_latestVersion)
22

33
A Java API for the truly excellent backblaze B2 storage
44

@@ -8,7 +8,8 @@ A Java API for the truly excellent backblaze B2 storage
88
String b2AccountId = ""; // your b2 account ID
99
String b2ApplicationKey = ""; // your b2 application Key
1010
11-
B2ApiClient b2ApiClient = new B2ApiClient(b2AccountId, b2ApplicationKey);
11+
B2ApiClient b2ApiClient = new B2ApiClient();
12+
b2ApiClient.authorize(b2AccountId, b2ApplicationKey);
1213
1314
// now create a private bucket
1415
B2BucketResponse createPrivateBucket = b2ApiClient.createBucket("super-secret-bucket" , BucketType.ALL_PRIVATE);
@@ -24,7 +25,10 @@ see [B2ApiClient.java](https://github.com/synapticloop/backblaze-b2-java-api/blo
2425

2526
```
2627
// create a new B2ApiClient
27-
B2ApiClient(String, String)
28+
B2ApiClient()
29+
30+
// authorize the client
31+
authorize(String, String)
2832
2933
// create a bucket
3034
createBucket(String, BucketType)

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ group = 'synapticloop'
1212
archivesBaseName = 'backblaze-b2-java-api'
1313
description = """An api for backblaze b2 storage in java"""
1414

15-
version = 'v1.1.3'
15+
version = 'v1.2.0'
1616

1717
description = """backblaze-b2-java-api"""
1818

@@ -153,4 +153,4 @@ github {
153153
assets = [
154154
'build/libs/' + archivesBaseName + '-' + version + '.jar'
155155
]
156-
}
156+
}
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
package synapticloop.b2;
22

3+
/*
4+
* Copyright (c) 2016 synapticloop.
5+
*
6+
* All rights reserved.
7+
*
8+
* This code may contain contributions from other parties which, where
9+
* applicable, will be listed in the default build file for the project
10+
* ~and/or~ in a file named CONTRIBUTORS.txt in the root of the project.
11+
*
12+
* This source code and any derived binaries are covered by the terms and
13+
* conditions of the Licence agreement ("the Licence"). You may not use this
14+
* source code or any derived binaries except in compliance with the Licence.
15+
* A copy of the Licence is available in the file named LICENSE.txt shipped with
16+
* this source code or binaries.
17+
*/
18+
319
/**
420
* The action for an associated file, either 'hide' or 'upload', "upload" means
521
* a file that was uploaded to B2 Cloud Storage. "hide" means a file version
@@ -11,17 +27,6 @@
1127
* @author synapticloop
1228
*/
1329
public enum Action {
14-
HIDE("hide"),
15-
UPLOAD("upload");
16-
17-
private final String actionType;
18-
19-
Action(String actionType) {
20-
this.actionType = actionType;
21-
}
22-
23-
@Override
24-
public String toString() {
25-
return(actionType);
26-
}
30+
hide,
31+
upload
2732
}

0 commit comments

Comments
 (0)