File tree Expand file tree Collapse file tree 5 files changed +33
-3
lines changed
library/src/main/java/io/syslogic/github/api Expand file tree Collapse file tree 5 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 8
8
* @author Martin Zeitler
9
9
*/
10
10
public final class Constants {
11
+
12
+ /** GitHub API Base URL */
11
13
@ 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'" ;
13
14
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. */
15
19
@ NonNull public static final String TABLE_QUERY_STRINGS = "query_strings" ;
20
+
21
+ /** Table name for Repository. */
16
22
@ NonNull public static final String TABLE_REPOSITORIES = "repositories" ;
23
+
24
+ /** Table name for Workflow. */
17
25
@ NonNull public static final String TABLE_WORKFLOWS = "workflows" ;
26
+
27
+ /** Table name for WorkflowRun. */
18
28
@ NonNull public static final String TABLE_WORKFLOW_RUNS = "workflow_runs" ;
29
+
30
+ /** Table name for License. */
19
31
@ NonNull public static final String TABLE_LICENSES = "licenses" ;
32
+
33
+ /** Table name for Owner. */
20
34
@ NonNull public static final String TABLE_OWNERS = "owners" ;
21
35
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public class GithubClient {
46
46
if (retrofit == null ) {
47
47
48
48
Gson gson = new GsonBuilder ()
49
- .setDateFormat (Constants .GITHUB_DATE_FORMAT )
49
+ .setDateFormat (Constants .GITHUB_API_DATE_FORMAT )
50
50
.create ();
51
51
52
52
OkHttpClient ok = new OkHttpClient .Builder ()
Original file line number Diff line number Diff line change @@ -17,19 +17,23 @@ public class Branch {
17
17
@ SerializedName ("commit" )
18
18
private Commit commit ;
19
19
20
+ /** Setter for name. */
20
21
public void setName (@ NonNull String value ) {
21
22
this .name = value ;
22
23
}
23
24
25
+ /** Setter for commit. */
24
26
public void setCommit (@ NonNull Commit item ) {
25
27
this .commit = item ;
26
28
}
27
29
30
+ /** Getter for commit. */
28
31
@ NonNull
29
32
public Commit getCommit () {
30
33
return this .commit ;
31
34
}
32
35
36
+ /** Getter for name. */
33
37
@ NonNull
34
38
public String getName () {
35
39
return this .name ;
Original file line number Diff line number Diff line change @@ -17,19 +17,23 @@ public class Commit {
17
17
@ SerializedName ("url" )
18
18
private String url ;
19
19
20
+ /** Setter for sha. */
20
21
public void setSha (@ NonNull String value ) {
21
22
this .sha = value ;
22
23
}
23
24
25
+ /** Setter for url. */
24
26
public void setUrl (@ NonNull String value ) {
25
27
this .url = value ;
26
28
}
27
29
30
+ /** Getter for sha. */
28
31
@ NonNull
29
32
public String getSha () {
30
33
return this .sha ;
31
34
}
32
35
36
+ /** Getter for url. */
33
37
@ NonNull
34
38
public String getUrl () {
35
39
return this .url ;
Original file line number Diff line number Diff line change 12
12
*/
13
13
public class StringArrayConverter {
14
14
15
+ /**
16
+ * @param value a JSON string.
17
+ * @return an instance of {@link String[]}.
18
+ */
15
19
@ NonNull
16
20
@ TypeConverter
17
21
public String [] fromJson (@ NonNull String value ) {
18
22
return new Gson ().fromJson (value , String [].class );
19
23
}
20
24
25
+ /**
26
+ * @param value a string-array.
27
+ * @return a JSON string.
28
+ */
21
29
@ NonNull
22
30
@ TypeConverter
23
31
public String toJson (@ NonNull String [] value ) {
You can’t perform that action at this time.
0 commit comments