Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41ade19

Browse files
committed
Bumped version
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent53e55b1 commit41ade19

File tree

8 files changed

+38
-28
lines changed

8 files changed

+38
-28
lines changed

‎README.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ const {Client, APIError} = require('labstack')
1919
constclient=newClient('<API_KEY>')
2020
constgeocode=client.geocode()
2121

22-
geocode.address({
23-
location:'eiffel tower'
24-
}).then(response=> {
22+
geocode.address('eiffel tower')
23+
.then(response=> {
2524
console.info(response)
2625
})
2726
.catch(error=> {

‎lib/client.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Client {
5656
returnnewWatermark(this)
5757
}
5858

59-
Webpage(){
59+
webpage(){
6060
returnnewWebpage(this)
6161
}
6262

‎lib/currency.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ class Currency {
33
this.client=client
44
}
55

6-
convert(request){
7-
returnthis.client._request('GET','/currency/convert',request,null,true)
6+
convert(from,to,value){
7+
returnthis.client._request('GET','/currency/convert',{
8+
from,
9+
to,
10+
value
11+
},null,true)
812
}
913

10-
rates(request){
11-
returnthis.client._request('GET','/currency/rates',request,null,true)
14+
rates(base){
15+
returnthis.client._request('GET','/currency/rates',{base},null,true)
1216
}
1317
}
1418

‎lib/geocode.js‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@ class Geocode {
33
this.client=client
44
}
55

6-
address(request){
7-
returnthis.client._request('GET','/geocode/address',request,null,true)
6+
address(location,options){
7+
returnthis.client._request('GET','/geocode/address',Object.assign({
8+
location
9+
},options),null,true)
810
}
911

10-
ip(request){
11-
returnthis.client._request('GET','/geocode/ip',request,null,true)
12+
ip(ip){
13+
returnthis.client._request('GET','/geocode/ip',{ip},null,true)
1214
}
1315

14-
reverse(request){
15-
returnthis.client._request('GET','/geocode/reverse',request,null,true)
16+
reverse(longitude,latitude,options){
17+
returnthis.client._request('GET','/geocode/reverse',Object.assign({
18+
longitude,
19+
latitude
20+
},options),null,true)
1621
}
1722
}
1823

‎lib/post.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Post {
33
this.client=client
44
}
55

6-
verify(request){
7-
returnthis.client._request('GET','/post/verify',request,null,true)
6+
verify(email){
7+
returnthis.client._request('GET','/post/verify',{email},null,true)
88
}
99
}
1010

‎lib/watermark.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ class Watermark {
33
this.client=client
44
}
55

6-
image(request){
6+
image(file,text,options){
77
constbody=newFormData()
8-
body.append('file',fs.createReadStream(request.file))
9-
body.append('text',request.text)
10-
body.append('font',request.font)
11-
body.append('size',request.size)
12-
body.append('color',request.color)
13-
body.append('opacity',request.opacity)
14-
body.append('position',request.position)
15-
body.append('margin',request.margin)
8+
body.append('file',fs.createReadStream(file))
9+
body.append('text',text)
10+
body.append('font',options.font)
11+
body.append('size',options.size)
12+
body.append('color',options.color)
13+
body.append('opacity',options.opacity)
14+
body.append('position',options.position)
15+
body.append('margin',options.margin)
1616
returnthis.client._request('POST','/watermark/image',null,body,false)
1717
}
1818
}

‎lib/webpage.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ class Webpage {
33
this.client=client
44
}
55

6-
pdf(request){
7-
returnthis.client._request('GET','/webpage/pdf',request,null,true)
6+
pdf(url,options){
7+
returnthis.client._request('GET','/webpage/pdf',Object.assign({
8+
url
9+
},options),null,true)
810
}
911
}
1012

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"labstack",
3-
"version":"0.31.0",
3+
"version":"0.31.1",
44
"description":"Official Node.js client library for the LabStack platform",
55
"main":"index.js",
66
"scripts": {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp