Skip to content

Commit 1265652

Browse files
committed
Updated readme and configs
1 parent 63742ce commit 1265652

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
2-
31
[![npm](https://img.shields.io/npm/dt/react-native-mqtt.svg)]()
42

5-
## Description
3+
## Description
64

75
[react-native](https://github.com/facebook/react-native) mqtt client module
86

97
## MQTT Features (inherit from native MQTT framework)
108
* Use [MQTT Framework](https://github.com/ckrey/MQTT-Client-Framework) for IOS, [Paho MQTT Client](https://eclipse.org/paho/clients/android/) for Android
119
* Support both IOS and Android
12-
* SSL/TLS
13-
* Native library, support mqtt over tcp
10+
* SSL/TLS
11+
* Native library, support mqtt over tcp
1412

1513
## Warning
16-
This library in progress developing, api may change, SSL/TLS non verify
14+
This library in progress developing, api may change, SSL/TLS non verify
1715

1816
## Getting started
1917

@@ -76,22 +74,20 @@ dependencies {
7674
## Usage
7775

7876
```javascript
79-
var mqtt = require('react-native-mqtt');
77+
import MQTT from 'react-native-mqtt';
8078

8179
/* create mqtt client */
82-
mqtt.createClient({
83-
uri: 'mqtt://test.mosquitto.org:1883',
80+
MQTT.createClient({
81+
uri: 'mqtt://test.mosquitto.org:1883',
8482
clientId: 'your_client_id'
8583
}).then(function(client) {
8684

8785
client.on('closed', function() {
8886
console.log('mqtt.event.closed');
89-
9087
});
91-
88+
9289
client.on('error', function(msg) {
9390
console.log('mqtt.event.error', msg);
94-
9591
});
9692

9793
client.on('message', function(msg) {

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
{
2-
"name": "react-native-mqtt",
3-
"version": "0.1.19",
2+
"name": "@rusfearuth/react-native-mqtt",
3+
"version": "0.2.0",
44
"description": "MQTT client for react-native",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/tuanpmt/react-native-mqtt.git"
11+
"url": "git+https://github.com/rusfearuth/react-native-mqtt.git"
1212
},
1313
"keywords": [
1414
"mqtt",
1515
"reactnative",
1616
"iot"
1717
],
1818
"author": "Tuan PM <[email protected]> (http://tuanpm.net)",
19+
"contributors": [
20+
{ "name" : "Yury Korolev", "email" : "[email protected]", "url" : "http://anjlab.com" },
21+
{ "name" : "Alexander Ustinov", "email" : "[email protected]", "url" : "http://github.com/rusfearuth" }
22+
],
1923
"license": "MIT",
2024
"bugs": {
21-
"url": "https://github.com/tuanpmt/react-native-mqtt/issues"
25+
"url": "https://github.com/rusfearuth/react-native-mqtt/issues"
2226
},
23-
"homepage": "https://github.com/tuanpmt/react-native-mqtt#readme"
27+
"homepage": "https://github.com/rusfearuth/react-native-mqtt#readme"
2428
}

0 commit comments

Comments
 (0)