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

feat: Implemented a basic API handler with Volley #195

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

itachi1706
Copy link
Owner

This is a extremely basic version and is subjected to changes

Part of #194

This is a extremely basic version and is subjected to changes

Part of #194
@itachi1706 itachi1706 self-assigned this Jan 29, 2024
@itachi1706 itachi1706 linked an issue Jan 29, 2024 that may be closed by this pull request
queue.add(request)
}

fun makePostCall(path: String, data: String, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

queue.add(request)
}

fun makePutCall(path: String, data: String, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

return queue.sequenceNumber
}

fun makeGetCall(path: String, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

queue.add(request)
}

fun makeDeleteCall(path: String, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.GET, path, null, listener)
}

fun makePostCall(path: String, data: String?, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.POST, path, data, listener)
}

fun makePutCall(path: String, data: String?, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.PUT, path, data, listener)
}

fun makeDeleteCall(path: String, listener: ApiCallListener) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.GET, path, null, listener)
}

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.POST, path, data, listener)
}

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

return queue.sequenceNumber
}

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

internalCallHandling(Request.Method.PUT, path, data, listener)
}

/**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

Copy link

codeclimate bot commented Jan 30, 2024

Code Climate has analyzed commit 1346ba3 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.

Copy link

sonarcloud bot commented Jan 30, 2024

@itachi1706 itachi1706 marked this pull request as ready for review January 30, 2024 19:15
@itachi1706 itachi1706 merged commit cdc21fa into master Jan 30, 2024
8 checks passed
@itachi1706 itachi1706 deleted the 194-api-handling branch January 30, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Handling
1 participant