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(String),
    source: String,
    thumbnail: Option(Image),
    thumbnail_alt_text: Option(String),
    title: String,
  )
}

Constructors

  • Article(
      description: Option(String),
      source: String,
      thumbnail: Option(Image),
      thumbnail_alt_text: Option(String),
      title: String,
    )
pub type Image {
  Image(id: String)
}

Constructors

  • Image(id: 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 Share {
  Share(id: String)
}

Constructors

  • Share(id: String)
pub type Userinfo {
  Userinfo(sub: String)
}

Constructors

  • Userinfo(sub: String)
pub type Visability {
  Connections
  Public
  LoggedIn
  Container
}

Constructors

  • Connections
  • Public
  • LoggedIn
  • Container

Constants

pub const api_host: String

Functions

pub fn auth_redirect(
  redirect: Uri,
) -> Result(#(String, String), String)
pub fn authenticate(
  app: App,
  scopes: List(String),
) -> Effect(String)
pub fn author_to_urn(author: Author) -> String
pub fn content_to_json(content: Content) -> Json
pub fn create_post(
  token: String,
  user_id: Author,
  content: Option(Content),
  commentary: String,
) -> Effect(String)
pub fn create_post_request(
  token: String,
  author: Author,
  content: Option(Content),
  commentary: String,
) -> Request(BitArray)
pub fn create_post_response(
  response: Response(BitArray),
) -> Result(String, Snag)
pub fn get_post(
  token: String,
  share: Share,
) -> Effect(Response(BitArray))
pub fn get_post_request(
  token: String,
  share: Share,
) -> Request(BitArray)
pub fn get_posts(
  token: String,
  author: Author,
) -> Effect(Response(BitArray))
pub fn get_posts_request(
  token: String,
  author: Author,
) -> Request(BitArray)
pub fn image_to_urn(image: Image) -> String
pub fn initialize_image_upload(
  token: String,
  owner: Author,
) -> Effect(InitializeImageUpload)
pub fn initialize_image_upload_decoder(
  raw: Dynamic,
) -> Result(InitializeImageUpload, List(DecodeError))
pub fn initialize_image_upload_request(
  token: String,
  owner: Author,
) -> Request(BitArray)
pub fn initialize_image_upload_response(
  response: Response(BitArray),
) -> Result(InitializeImageUpload, Snag)
pub fn token_request(
  client_id: String,
  redirect_uri: String,
  client_secret: String,
  code: String,
) -> Request(BitArray)
pub fn token_response(
  response: Response(BitArray),
) -> Result(String, a)
pub fn upload_image(
  token: String,
  owner: Author,
  bits: BitArray,
) -> Effect(Image)
pub fn userinfo(token: String) -> Effect(Userinfo)
pub fn userinfo_request(token: String) -> Request(BitArray)
pub fn userinfo_response(
  response: Response(BitArray),
) -> Result(Userinfo, Snag)
pub fn visability_to_string(visability: Visability) -> String
Search Document