google_youtube_api_v3/generate
Types
pub type DiscoveryError {
ReadFailed(simplifile.FileError)
WriteFailed(simplifile.FileError)
ParseFailed(json.DecodeError)
}
Constructors
-
ReadFailed(simplifile.FileError) -
WriteFailed(simplifile.FileError) -
ParseFailed(json.DecodeError)
pub type HttpMethod {
Get
Post
Put
Delete
}
Constructors
-
Get -
Post -
Put -
Delete
pub type Kind {
Ref(name: String)
Str(format: option.Option(String), enum: List(String))
Integer(format: option.Option(String))
Number
Boolean
Any
Array(items: Schema)
Object(
properties: dict.Dict(String, Schema),
additional: option.Option(Schema),
)
}
Constructors
-
Ref(name: String) -
Str(format: option.Option(String), enum: List(String)) -
Integer(format: option.Option(String)) -
Number -
Boolean -
Any -
Array(items: Schema) -
Object( properties: dict.Dict(String, Schema), additional: option.Option(Schema), )
pub type MediaUpload {
MediaUpload(
accept: List(String),
max_size: option.Option(String),
protocols: List(String),
)
}
Constructors
-
MediaUpload( accept: List(String), max_size: option.Option(String), protocols: List(String), )
pub type Method {
Method(
id: String,
path: String,
http_method: HttpMethod,
description: option.Option(String),
parameters: dict.Dict(String, Parameter),
parameter_order: List(String),
request: option.Option(String),
response: option.Option(String),
scopes: List(String),
media_upload: option.Option(MediaUpload),
supports_media_upload: Bool,
supports_media_download: Bool,
)
}
Constructors
-
Method( id: String, path: String, http_method: HttpMethod, description: option.Option(String), parameters: dict.Dict(String, Parameter), parameter_order: List(String), request: option.Option(String), response: option.Option(String), scopes: List(String), media_upload: option.Option(MediaUpload), supports_media_upload: Bool, supports_media_download: Bool, )
pub type ParamType {
ParamString
ParamInteger
ParamBoolean
}
Constructors
-
ParamString -
ParamInteger -
ParamBoolean
pub type Parameter {
Parameter(
location: Location,
param_type: ParamType,
format: option.Option(String),
description: option.Option(String),
required: Bool,
repeated: Bool,
default: option.Option(String),
minimum: option.Option(String),
maximum: option.Option(String),
enum: List(String),
deprecated: Bool,
)
}
Constructors
-
Parameter( location: Location, param_type: ParamType, format: option.Option(String), description: option.Option(String), required: Bool, repeated: Bool, default: option.Option(String), minimum: option.Option(String), maximum: option.Option(String), enum: List(String), deprecated: Bool, )
pub type Schema {
Schema(description: option.Option(String), kind: Kind)
}
Constructors
-
Schema(description: option.Option(String), kind: Kind)
Values
pub fn build_module(type_name: String, schema: Schema) -> String
Build the full source text for a single schema file.
pub fn flatten_resources(
resources: dict.Dict(String, Resource),
) -> List(#(String, List(#(String, Method))))
Every resource with methods, top-level and nested. Nested paths join
with underscores: youtube/v3/liveChat/messages becomes
youtube_v3_live_chat_messages.
pub const generated_notice: String
Marker rendered as a //// comment on top of every generated file.
pub fn kind_decoder() -> decode.Decoder(Kind)
pub fn media_upload_decoder() -> decode.Decoder(MediaUpload)
pub fn method_decoder() -> decode.Decoder(Method)
pub fn parameter_decoder() -> decode.Decoder(Parameter)
pub fn parse_discovery(
content: String,
) -> Result(Discovery, DiscoveryError)
pub fn resource_decoder() -> decode.Decoder(Resource)
pub fn root_decoder() -> decode.Decoder(Discovery)
pub fn schema_decoder() -> decode.Decoder(Schema)