Skip to content

Commit

Permalink
README fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkis committed Mar 10, 2019
1 parent d515952 commit b952e82
Show file tree
Hide file tree
Showing 106 changed files with 30 additions and 24,314 deletions.
1 change: 0 additions & 1 deletion node_modules/fetch/.npmignore → .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.DS_Store
node_modules
6 changes: 6 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ISC License (ISC)
Copyright 2019 Erick Calder <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
A package that allows the caller to extract SMS messages sent to public numbers
published by the http://receive-smss.com service

One usecase this functionality serves is phone number verification. Whilst
typically this is accomplished by sending the user's phone number a unique code
One usecase this functionality serves is phone number verification

Whilst typically this is accomplished by sending the user's phone number a unique code
that must then be entered into a web page, because sending costs but receiving
is free, the procedure can be reversed. Give the user a phone number from the
list of public numbers available from via this service, and a unique code or
Expand All @@ -29,22 +30,26 @@ const sms = require('sms-receive');
Returns an array of objects comprising phone numbers available for receipt of
messages, and the countries where these ar located e.g.
```
{
[{
loc: 'United States',
nbr: '+1 2015471451'
}
}]
```
### messages(sender, regexp, receiver)
* `sender` the phone number expected to send a message
* `regexp` a regular expression used to find a match
* `receiver` the receiving phone number to inspect

Retrieves a list of the messages recently sent to the given receiver by various
senders. This list shifts across time. The objects returned comprise a sender
phone number, the message, and a time offset when the message was sent e.g.
senders. This list shifts across time as the service expires old messages. The
objects returned comprise a sender phone number, the message, and a time offset
when the message was sent e.g.
```
{
[{
sender: '19852502821',
message: 'Use 428210 como seu codigo de login para o Tinder. (Account Kit by Facebook)',
time: '2 minutes ago'
}
}]
```
### check(sender, regexp, receiver)
* `sender` specifies the phone number sending the message
Expand Down Expand Up @@ -76,8 +81,8 @@ sms.numbers().then(console.log);
# async/await
(async () => {
var ls = await sms.numbers();
console.log(ls);
var ls = await sms.numbers();
console.log(ls);
})();
```
which produces a list similar to the following:
Expand All @@ -91,7 +96,7 @@ which produces a list similar to the following:
> { loc: 'Sweden', nbr: '+46 769436478' },
> { loc: 'Poland', nbr: '+48 732232809' } ]
Supposing the first number in the list is provided to your user, The list of
Supposing the first number in the list is provided to your user, the list of
messages sent to that number may be retrieved like this:
```
sms.messages('12015471451').then(console.log);
Expand All @@ -104,28 +109,24 @@ producing something like:
> time: '2 minutes ago' },
> { sender: '19852502821',
> message:
> 'Use 534195 como seu codigo de login para o Tinder. (Account Kit by Facebook)',
> time: '3 minutes ago' },
> { sender: '19852502821',
> message:
> 'Use 771145 as your login code for Smule. (Account Kit by Facebook)',
> time: '13 minutes ago' },
Or the page can be checked for then sender to post a specific value (like a code):
Or the page can be checked for the sender to post a specific value (like a code):
```
sms.check('19852502821', /Use 428210/, '12015471451')
.then(res => console.log(res ? 'CODE SENT': 'CODE NOT YET SENT'));
.then(res => console.log(res ? 'CODE SENT': 'CODE NOT YET SENT'));
```
And the page can also be watched. The example below expires after 3 times,
with 3 second waits in between:
```
self.watch({
sender: '19852502821',
receiver: '12015471451',
re: /Use 428210/,
count: 3,
delay: 3000,
callback: res => { console.log(res ? 'FOUND' : 'FAILED'); }
sender: '19852502821',
receiver: '12015471451',
re: /Use 428210/,
count: 3,
delay: 3000,
callback: res => { console.log(res ? 'FOUND' : 'FAILED'); }
});
```
## Licence
Expand Down
1 change: 0 additions & 1 deletion node_modules/.bin/he

This file was deleted.

20 changes: 0 additions & 20 deletions node_modules/biskviit/.jshintrc

This file was deleted.

29 changes: 0 additions & 29 deletions node_modules/biskviit/.npmignore

This file was deleted.

9 changes: 0 additions & 9 deletions node_modules/biskviit/.travis.yml

This file was deleted.

30 changes: 0 additions & 30 deletions node_modules/biskviit/Gruntfile.js

This file was deleted.

22 changes: 0 additions & 22 deletions node_modules/biskviit/LICENSE

This file was deleted.

98 changes: 0 additions & 98 deletions node_modules/biskviit/README.md

This file was deleted.

Loading

0 comments on commit b952e82

Please sign in to comment.