Skip to content

Commit 68bd8ed

Browse files
committed
javadoc comments added.
1 parent 8f84ef3 commit 68bd8ed

File tree

5 files changed

+33
-3
lines changed

5 files changed

+33
-3
lines changed

library/src/main/java/io/syslogic/github/api/Constants.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,28 @@
88
* @author Martin Zeitler
99
*/
1010
public final class Constants {
11+
12+
/** GitHub API Base URL */
1113
@NonNull public static final String GITHUB_API_BASE_URL = "https://api.github.com/";
12-
@NonNull public static final String GITHUB_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
1314

14-
/** Table Names */
15+
/** GitHub API date-format. */
16+
@NonNull public static final String GITHUB_API_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
17+
18+
/** Table name for QueryString. */
1519
@NonNull public static final String TABLE_QUERY_STRINGS = "query_strings";
20+
21+
/** Table name for Repository. */
1622
@NonNull public static final String TABLE_REPOSITORIES = "repositories";
23+
24+
/** Table name for Workflow. */
1725
@NonNull public static final String TABLE_WORKFLOWS = "workflows";
26+
27+
/** Table name for WorkflowRun. */
1828
@NonNull public static final String TABLE_WORKFLOW_RUNS = "workflow_runs";
29+
30+
/** Table name for License. */
1931
@NonNull public static final String TABLE_LICENSES = "licenses";
32+
33+
/** Table name for Owner. */
2034
@NonNull public static final String TABLE_OWNERS = "owners";
2135
}

library/src/main/java/io/syslogic/github/api/GithubClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class GithubClient {
4646
if (retrofit == null) {
4747

4848
Gson gson = new GsonBuilder()
49-
.setDateFormat(Constants.GITHUB_DATE_FORMAT)
49+
.setDateFormat(Constants.GITHUB_API_DATE_FORMAT)
5050
.create();
5151

5252
OkHttpClient ok = new OkHttpClient.Builder()

library/src/main/java/io/syslogic/github/api/model/Branch.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@ public class Branch {
1717
@SerializedName("commit")
1818
private Commit commit;
1919

20+
/** Setter for name. */
2021
public void setName(@NonNull String value) {
2122
this.name = value;
2223
}
2324

25+
/** Setter for commit. */
2426
public void setCommit(@NonNull Commit item) {
2527
this.commit = item;
2628
}
2729

30+
/** Getter for commit. */
2831
@NonNull
2932
public Commit getCommit() {
3033
return this.commit;
3134
}
3235

36+
/** Getter for name. */
3337
@NonNull
3438
public String getName() {
3539
return this.name;

library/src/main/java/io/syslogic/github/api/model/Commit.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@ public class Commit {
1717
@SerializedName("url")
1818
private String url;
1919

20+
/** Setter for sha. */
2021
public void setSha(@NonNull String value) {
2122
this.sha = value;
2223
}
2324

25+
/** Setter for url. */
2426
public void setUrl(@NonNull String value) {
2527
this.url = value;
2628
}
2729

30+
/** Getter for sha. */
2831
@NonNull
2932
public String getSha() {
3033
return this.sha;
3134
}
3235

36+
/** Getter for url. */
3337
@NonNull
3438
public String getUrl() {
3539
return this.url;

library/src/main/java/io/syslogic/github/api/utils/StringArrayConverter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@
1212
*/
1313
public class StringArrayConverter {
1414

15+
/**
16+
* @param value a JSON string.
17+
* @return an instance of {@link String[]}.
18+
*/
1519
@NonNull
1620
@TypeConverter
1721
public String[] fromJson(@NonNull String value) {
1822
return new Gson().fromJson(value, String[].class);
1923
}
2024

25+
/**
26+
* @param value a string-array.
27+
* @return a JSON string.
28+
*/
2129
@NonNull
2230
@TypeConverter
2331
public String toJson(@NonNull String[] value) {

0 commit comments

Comments
 (0)