-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add generated catalog models #17
Conversation
5f22230
to
ba8d46a
Compare
The following commit will contain generated code that does not at all comply with our lint settings. This commit changes them so it will pass. It's an isolated commit so it can be reversed once we've fixed this in the future
This is an API client generated by openapi-generator-cli Only changes made to this are: - Adding dependencies to our version catalog - Changing package structure to fit with the SDK paradigm This state is temporary.
ba8d46a
to
12e663e
Compare
/** | ||
* | ||
* Please note: | ||
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namings of the files are weird (APIApi) - intended?
|
||
package com.tidal.sdk.catalog.models | ||
|
||
import com.squareup.moshi.Json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using moshi instead of kotlinx.serialization. Any reason for that?
*/ | ||
@Suppress("UNCHECKED_CAST") | ||
@Throws(IllegalStateException::class, IOException::class) | ||
fun getArtistWithHttpInfo(id: kotlin.String, countryCode: kotlin.String, include: kotlin.collections.List<kotlin.String>?) : ApiResponse<ArtistDataDocument?> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come these are not suspend funs?
|
||
val EMPTY_REQUEST: RequestBody = ByteArray(0).toRequestBody() | ||
|
||
@TargetApi(26) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we cool to raise the app api to 26?
|
||
val apiKey: MutableMap<String, String> = mutableMapOf() | ||
val apiKeyPrefix: MutableMap<String, String> = mutableMapOf() | ||
var username: String? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these seem to be unused
protected const val XML_MEDIA_TYPE = "application/xml" | ||
protected const val OCTET_MEDIA_TYPE = "application/octet-stream" | ||
|
||
val apiKey: MutableMap<String, String> = mutableMapOf() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exposing mutable maps is quite meh, no?
This adds generated catalog code made using
openapi-generator-cli
from our catalog API endpoint definitions.Only changes necessary to make it compile in our codebase have been made (see commit descriptions).
This is a temporary version intended for prototyping. It will be subject to change.
The generated code has a lot of small issues, but if you're looking to use just the types, you'll be fine.
This will also not be released publicly. If you have trouble creating a local release to work with this hit me up, and I'll shoe you how.