Git Product home page Git Product logo

linemessagingapi's Introduction

LineMessagingApi

LINE Messaging API Client Library for .NET (C#)

Install

Quick Start

LineOAuthClient

Usage

var oAuthClient = new LineOAuthClient("Your Channel ID", "Your Channel Secret");

// get access token
var accessToken = await oAuthClient.GetAccessToken();

// revoke access token
await oAuthClient.RevokeAccessToken(accessToken);

LineWebhookRequest

Usage

var webhookRequest = new LineWebhookRequest("Your Channel Secret", HttpRequestMessage);

// verify X-Line-Signature and request body
var valid = await webhookRequest.IsValid();

// get content json
var json = await webhookRequest.GetContentJson();

// get deserialized object
var webhookContent = await webhookRequest.GetContent();

LineMessagingClient

Usage

var messagingClient = new LineMessagingClient("Access Token");

// push single message (text, image, video, audio...)
await messagingClient.PushMessage("User ID", ILineMessage);

// push multiple messages (text, image, video, audio...)
await messagingClient.PushMessage("User ID", IList<ILineMessage> messages);

// push single text message
await messagingClient.PushMessage("User ID", "text message");

// push multiple text message
await messagingClient.PushMessage("User ID", new [] { "text message 1", "text message 2" });

// multicast message
await messagingClient.MulticastMessage(LineMulticastMessage);

// multicast single text message
await messagingClient.MulticastMessage(new [] { "User ID 1", "User ID 2" }, "text message");

Methods

Type Name Summary
Task<String> CreateRichMenu(LineRichMenu richMenu)
Task DeleteRichMenu(String richMenuId)
Task<LineProfile> GetGroupMember(String groupId, String userId)
Task<LineMembers> GetGroupMembers(String groupId, String start = null)
Task<Byte[]> GetMessageContent(String messageId)
Task<LineProfile> GetProfile(String userId)
Task<LineRichMenuResponse> GetRichMenu(String richMenuId)
Task<Byte[]> GetRichMenuContent(String richMenuId)
Task<LineProfile> GetRoomMember(String roomId, String userId)
Task<LineMembers> GetRoomMembers(String roomId, String start = null)
Task<String> GetUsersRichMenuId(String userId)
Task LeaveGroup(String groupId)
Task LeaveRoom(String roomId)
Task LinkUsersRichMenu(String userId, String richMenuId)
Task MulticastMessage(LineMulticastMessage multicastMessage)
Task MulticastMessage(IEnumerable<String> to, ILineMessage message)
Task MulticastMessage(IEnumerable<String> to, IEnumerable<ILineMessage> messages)
Task MulticastMessage(IEnumerable<String> to, String message)
Task MulticastMessage(IEnumerable<String> to, String[] messages)
Task PushMessage(LinePushMessage pushMessage)
Task PushMessage(String to, ILineMessage message)
Task PushMessage(String to, IEnumerable<ILineMessage> messages)
Task PushMessage(String to, String message)
Task PushMessage(String to, String[] messages)
Task ReplyMessage(LineReplyMessage replyMessage)
Task ReplyMessage(String replyToken, IEnumerable<ILineMessage> messages)
Task ReplyMessage(String replyToken, String message)
Task ReplyMessage(String replyToken, String[] messages)
Task UnlinkUsersRichMenu(String userId)

Reference

LineMessagingApi API documents.

Generated by MarkdownGenerator

linemessagingapi's People

Contributors

anagura avatar dependabot[bot] avatar kiyoaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

linemessagingapi's Issues

Thanks!

Hi kiyoki,

I wanted to express my appreciation for your fantastic project! ๐Ÿš€ The effort and attention to detail truly shine through. Thank you for contributing to the open-source community!

I recently forked your project as it perfectly aligns with my needs. Your work has been immensely helpful, and I'm excited to tailor it to suit my specific requirements. Your dedication to creating such a valuable resource is truly commendable.

Cheers,
Phidias

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.