midas/sdk/linkedin
Types
pub type App {
App(
client_id: String,
client_secret: String,
redirect_uri: String,
)
}
Constructors
-
App( client_id: String, client_secret: String, redirect_uri: String, )
pub type Author {
Person(id: String)
Organization(id: String)
}
Constructors
-
Person(id: String)
-
Organization(id: String)
pub type Content {
Article(
description: option.Option(String),
source: String,
thumbnail: option.Option(Image),
thumbnail_alt_text: option.Option(String),
title: String,
)
}
Constructors
-
Article( description: option.Option(String), source: String, thumbnail: option.Option(Image), thumbnail_alt_text: option.Option(String), title: String, )
pub type InitializeImageUpload {
InitializeImageUpload(
upload_url_expires_at: Int,
upload_url: String,
image: String,
)
}
Constructors
-
InitializeImageUpload( upload_url_expires_at: Int, upload_url: String, image: String, )
pub type Visability {
Connections
Public
LoggedIn
Container
}
Constructors
-
Connections
-
Public
-
LoggedIn
-
Container
Values
pub fn auth_redirect(
redirect: uri.Uri,
) -> Result(#(String, String), String)
pub fn authenticate(
app: App,
scopes: List(String),
) -> task.Effect(String)
pub fn author_to_urn(author: Author) -> String
pub fn create_post(
token: String,
user_id: Author,
content: option.Option(Content),
commentary: String,
) -> task.Effect(String)
pub fn create_post_request(
token: String,
author: Author,
content: option.Option(Content),
commentary: String,
) -> request.Request(BitArray)
pub fn create_post_response(
response: response.Response(BitArray),
) -> Result(String, snag.Snag)
pub fn get_post(
token: String,
share: Share,
) -> task.Effect(response.Response(BitArray))
pub fn get_post_request(
token: String,
share: Share,
) -> request.Request(BitArray)
pub fn get_posts(
token: String,
author: Author,
) -> task.Effect(response.Response(BitArray))
pub fn get_posts_request(
token: String,
author: Author,
) -> request.Request(BitArray)
pub fn image_to_urn(image: Image) -> String
pub fn initialize_image_upload(
token: String,
owner: Author,
) -> task.Effect(InitializeImageUpload)
pub fn initialize_image_upload_decoder(
,
) -> decode.Decoder(InitializeImageUpload)
pub fn initialize_image_upload_request(
token: String,
owner: Author,
) -> request.Request(BitArray)
pub fn initialize_image_upload_response(
response: response.Response(BitArray),
) -> Result(InitializeImageUpload, snag.Snag)
pub fn token_request(
client_id: String,
redirect_uri: String,
client_secret: String,
code: String,
) -> request.Request(BitArray)
pub fn token_response(
response: response.Response(BitArray),
) -> Result(String, a)
pub fn upload_image(
token: String,
owner: Author,
bits: BitArray,
) -> task.Effect(Image)
pub fn userinfo(token: String) -> task.Effect(Userinfo)
pub fn userinfo_request(
token: String,
) -> request.Request(BitArray)
pub fn userinfo_response(
response: response.Response(BitArray),
) -> Result(Userinfo, snag.Snag)
pub fn visability_to_string(visability: Visability) -> String