Giter Site home page Giter Site logo

jikstra / deltachat-node-legacy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deltachat/deltachat-node-legacy

0.0 1.0 0.0 78 KB

[WIP] Node bindings for deltachat-core

Home Page: https://delta.chat

License: GNU General Public License v3.0

C++ 81.05% Python 2.89% JavaScript 7.71% Shell 0.96% C 7.39%

deltachat-node-legacy's Introduction

deltachat-node

A Node.js API for deltachat-core's native C library. This is a WORK IN PROGRESS.

npm install deltachat-node

Usage

Set up

var deltachat = require('deltachat-node')

function my_delta_handler(mailbox, ev, data1, data2) {
  return 0
}

var mailbox = deltachat.mrmailbox_new(my_delta_handler, null, null)

deltachat.mrmailbox_set_config(mailbox, "addr", "[email protected]") // use some real test credentials here
deltachat.mrmailbox_set_config(mailbox, "mail_pw", "***") 

deltachat.mrmailbox_configure_and_connect(mailbox)

Sending a message

var contact_id = deltachat.mrmailbox_create_contact(mailbox, NULL, "[email protected]") // use a real testing address here
var chat_id = deltachat.mrmailbox_create_chat_by_contact_id(mailbox, contact_id)
deltachat.mrmailbox_send_text_msg(mailbox, chat_id, "Hi, here is my first message!");

There are many more functions available that further manage and retrieve contacts, messages, and chats. Learn about all of the functions in API in the deltachat C documentation.

Developing

npm install should be enough to setup the project and involves doing:

  • Updating and compiling the deltachat-core code base
  • Compiling the native addon and linking it with the deltachat-core

License

GPLv3

deltachat-node-legacy's People

Contributors

jikstra avatar karissa avatar okdistribute avatar ralphtheninja avatar

Watchers

 avatar

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.