A curl-like client for the Discord API

Related tags

Templates discord
Overview

durl

A curl-like command-line client for Discord bot and user APIs.

Features

  • Bot auth flow
  • User Oauth2 flow (redirects to http://localhost:3000)
  • get, post, put, patch, delete requests
  • JSON body
  • JSON headers

Requirements

  • You must have Dart installed on your system
  • You must have a Discord app

A bot account is HIGHLY RECOMMENDED. User accounts are severely limited by Discord's API and Terms of Service. That said, a full user Oauth2 flow is implemented under durl auth-user

Installation

dart pub global activate --source git https://github.com/lukepighetti/durl
durl auth -i $APPLICATION_ID -t $BOT_TOKEN

Examples

# Fetch my user info with a GET request
durl api -p /users/@me

# Send message with a POST request
durl api -X post -p "/channels/101503/messages" -b "{\"content\":\"hellooo!\"}"

# Update guild icon with base64 image in a PATCH request
durl api -X patch -p "/guilds/101429" -b "{\"icon\":\"data:image/jpeg;base64,$(base64 -i avatar.jpg)\"}"

Tips

Use jq to parse response objects when using durl to write shell scripts.

# Fetch the authenticated user id and store it
USER_ID=$(durl api -p /users/@me | jq -r ".id")

Contributing

This project is intended to be very simple, that said, here are some missing features:

  1. Support for operating systems that don't use *nix style paths. See durl.dart:11
  2. Automatically refresh the user token when it expires. See durl.dart:202
You might also like...

Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Flutter Weather App using API with darkmode support Flutter 2.8.1 Null Safety Beautiful Weather App using https://github.com/MonsieurZbanowanYY/Weathe

Nov 29, 2022

Authentication API client with Flutter (Login, Register, Google Login, Facebook Login, Apple Login)

Authentication API client with Flutter (Login, Register, Google Login, Facebook Login, Apple Login)

Flutter Auth App (Login, Register, Google Login, Facebook Login, Apple Login) To use this client, get the server up and running. Try it out now! App S

Jan 4, 2023

Powerful, helpfull, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.

Powerful, helpfull, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server with boilerplate code free.

flutter_axelor_sdk Powerful, helpful, extensible and highly customizable API's that wrap http client to make communication easier with Axelor server w

Dec 25, 2022

A WordPress API client for dart with support for WooCommerce and custom namespaces.

A WordPress API client for dart with support for WooCommerce and custom namespaces.

WordPress REST API client for Dart | Flutter Description A WordPress REST API client for dart with support for WooCommerce and custom namespaces/endpo

Nov 26, 2022

Passwall-mobile - A mobile client for PassWall API written with Flutter

Passwall-mobile - A mobile client for PassWall API written with Flutter

passwall-mobile PassWall Mobile is a mobile client for PassWall API written with Flutter. Getting Started Clone the server app and build it. Install F

Nov 22, 2022

Zone is yet another Hacker News client, built with Flutter, Slidy, and Hacker News API.

Zone is yet another Hacker News client, built with Flutter, Slidy, and Hacker News API.

Zone for Hacker News Zone is yet another Hacker News client, built with Flutter, Slidy, and Hacker News API. Setup Clone this repo to your machine Req

Feb 27, 2022

Firebase API Client Libraries for Dart

Firebase API Client Libraries for Dart

🔥 Generated Firebase APIs for Dart. Additionally Includes private and unlisted APIs.

Oct 18, 2022

Google Vision images REST API Client

Native Dart package that integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.

Jan 7, 2023

This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise projects and builds and lets you download your artifacts.

This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise projects and builds and lets you download your artifacts.

Bitrise Artifact Downloader Introduction 🙋‍♂️ This is a flutter app which uses the Bitrise Api(https://api-docs.bitrise.io/) to show the bitrise proj

Apr 30, 2021
Owner
Luke Pighetti
Mobile engineer
Luke Pighetti
Overlapping panels - Discord inspired navigation for Flutter apps

Overlapping Panels Add Discord-like navigation to your app. Demo project here: o

Degreat 30 Dec 23, 2022
Last.fm Discord Integrator

Эта страница на русском Shows what you are listening to in your Discord status Overview LFDI updates your Discord status every 30 seconds, showing wha

null 18 Dec 4, 2022
Simple app for both Android and Windows to sync Audio Trip songs from the Audio Trip Choreography Discord

ATCD Choreography Sync Simple app for both Android (Oculus Quest native) and Windows (PCVR) to sync Audio Trip songs from the Audio Trip Choreography

atcd 2 Nov 15, 2022
Dart API Client which wraps the QvaPay API

qvapay_api_client Dart API Client which wraps the QvaPay API The client needs Dio to perform the requests, you must inject an instance in the construc

QvaPay 7 Nov 2, 2022
An Imgur API Client Library that uses Imgur's v3 API for Dart

imgur.dart An Imgur API Client Library that uses Imgur's v3 API for Dart. Usage

null 2 Dec 2, 2022
A fully-featured Last.fm client and scrobbler with Shazam-like scrobbling, a collage generator, home screen widgets, and more!

Finale A fully-featured Last.fm client and scrobbler with Shazam-like scrobbling, a collage generator, and more! The app is available on iOS, Android,

Noah Rubin 66 Jan 5, 2023
A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package. Built after react apollo

Flutter GraphQL Table of Contents Flutter GraphQL Table of Contents About this project Installation Usage GraphQL Provider [Graphql Link and Headers]

Snowball Digital 45 Nov 9, 2022
A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.

GraphQL Flutter ?? Bulletin See the v3 -> v4 Migration Guide if you're still on v3. Maintenance status: Low. Follow #762 for updates on the planned ar

Zino & Co. 3.1k Jan 5, 2023
Vrchat mobile client - VRChat Unofficial Mobile Client For Flutter

VRChatMC VRChatの非公式なAPIを利用したVRChatのモバイルクライアント Flutterで作成されたシンプルなUIが特徴的です iosビルドは

ふぁ 8 Sep 28, 2022
Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight Node.js based Bhagavad Gita API [An open source rest api on indian Vedic Scripture Shrimad Bhagavad Gita].

Gita Bhagavad Gita flutter app. Download App - Playstore Web Application About Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight No

Ravi Kovind 7 Apr 5, 2022