Make extended-description-download work properly (IOS-20)
APIService was missing and URL was wrong
This commit is contained in:
parent
cdf0aa98e6
commit
ba2f1f5f40
|
@ -24,4 +24,8 @@ extension APIService {
|
||||||
) -> AnyPublisher<Mastodon.Response.Content<Mastodon.Entity.V2.Instance>, Error> {
|
) -> AnyPublisher<Mastodon.Response.Content<Mastodon.Entity.V2.Instance>, Error> {
|
||||||
return Mastodon.API.V2.Instance.instance(session: session, domain: domain)
|
return Mastodon.API.V2.Instance.instance(session: session, domain: domain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func extendedDescription(domain: String) -> AnyPublisher<Mastodon.Response.Content<Mastodon.Entity.ExtendedDescription>, Error> {
|
||||||
|
return Mastodon.API.Instance.extendedDescription(session: session, domain: domain)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ extension Mastodon.API.Instance {
|
||||||
}
|
}
|
||||||
|
|
||||||
static func extendedDescriptionEndpointURL(domain: String) -> URL {
|
static func extendedDescriptionEndpointURL(domain: String) -> URL {
|
||||||
return Mastodon.API.endpointURL(domain: domain).appendingPathComponent("extended_description")
|
return Mastodon.API.endpointURL(domain: domain).appendingPathComponent("instance").appendingPathComponent("extended_description")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Extended description of the server
|
/// Extended description of the server
|
||||||
|
|
|
@ -8,8 +8,8 @@ extension Mastodon.Entity {
|
||||||
/// ## Reference:
|
/// ## Reference:
|
||||||
/// [Document](https://docs.joinmastodon.org/entities/ExtendedDescription/)
|
/// [Document](https://docs.joinmastodon.org/entities/ExtendedDescription/)
|
||||||
public struct ExtendedDescription: Codable {
|
public struct ExtendedDescription: Codable {
|
||||||
let updatedAt: Date
|
public let updatedAt: Date
|
||||||
let content: String
|
public let content: String
|
||||||
|
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
case updatedAt = "updated_at"
|
case updatedAt = "updated_at"
|
||||||
|
|
Loading…
Reference in New Issue