Skip to content

Commit b97a6ee

Browse files
Updates dependencies and README.
1 parent 3531edb commit b97a6ee

File tree

2 files changed

+52
-33
lines changed

2 files changed

+52
-33
lines changed

Diff for: ReadMe.md

+19-15
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Available options for the constructor are the following:
3030
ddb.createTable('foo', { hash: ['id', ddb.schemaTypes().string],
3131
range: ['time', ddb.schemaTypes().number] },
3232
{read: 10, write: 10}, function(err, details) {});
33-
33+
3434
// res: { "CreationDateTime": 1.310506263362E9,
3535
// "KeySchema": { "HashKeyElement": { "AttributeName": "AttributeName1",
3636
// "AttributeType": "S"},
@@ -41,10 +41,10 @@ Available options for the constructor are the following:
4141
// "TableName":"Table1",
4242
// "TableStatus":"CREATING" }
4343

44-
### ListTables
44+
### ListTables
4545

4646
ddb.listTables({}, function(err, res) {});
47-
47+
4848
// res: { LastEvaluatedTableName: 'bar',
4949
TableNames: ['test','foo','bar'] }
5050

@@ -68,18 +68,18 @@ Available options for the constructor are the following:
6868
### GetItem
6969

7070
ddb.getItem('a-table', '3d2d6963', null, {}, function(err, res, cap) {});
71-
71+
7272
// res: { score: 304,
7373
// date: 123012398234,
7474
// sha: '3d2d6963',
7575
// usr: 'spolu',
7676
// lng: ['node', 'c++'] };
77-
78-
### DeleteItem
77+
78+
### DeleteItem
7979

8080
ddb.deleteItem('a-table', 'sha', null, {}, function(err, res, cap) {});
81-
82-
### UpdateItem
81+
82+
### UpdateItem
8383

8484
ddb.updateItem('a-table', '3d2d6963', null, { 'usr': { value: 'smthg' } }, {},
8585
function(err, res, cap) {});
@@ -95,12 +95,12 @@ Available options for the constructor are the following:
9595
console.log(res);
9696
}
9797
});
98-
98+
9999
// res: { ConsumedCapacityUnits: 1.5,
100100
items: [...] };
101101

102102
### BatchWriteItem
103-
103+
104104
//ddb.batchWriteItem(PutRequest, DeleteRequest, cb)
105105
ddb.batchWriteItem({'table': [item1, item2]}, {'table': ['foo', 'bar']}, function(err, res) {
106106
if(err) {
@@ -109,13 +109,13 @@ Available options for the constructor are the following:
109109
console.log(res);
110110
}
111111
});
112-
112+
113113
// res: { UnprocessedItems: { ... } };
114114

115-
### Query
115+
### Query
116116

117117
ddb.query('test', '3d2d6963', {}, function(err, res, cap) {...});
118-
118+
119119
// res: { count: 23,
120120
// lastEvaluatedKey: { hash: '3d2d6963' },
121121
// items: [...] };
@@ -129,7 +129,7 @@ Available options for the constructor are the following:
129129
console.log(res);
130130
}
131131
});
132-
132+
133133
// res: { count: 23,
134134
// lastEvaluatedKey: { hash: '3d2d6963' },
135135
// items: [...] };
@@ -146,10 +146,14 @@ Put in your environment:
146146
export DYNAMODB_SECRETACCESSKEY=YOURSECRETKEYID
147147
export DYNAMODB_TEST_TABLE1=test
148148

149-
Make sure you have a `test` table created and available with `sha` as a hash key (string), then run:
149+
Make sure you have a `test` table created and available with `sha` as a hash key (string). Make sure to select `Hash` as the `Primary Key Type`. Then run:
150150

151151
make test
152152

153+
If you are getting one of these errors:
154+
155+
* `User: ... is not authorized to perform: dynamodb:PutItem on resource` you need to add `AmazonDynamoDBFullAccess` to the user in [IAM policy editor](https://console.aws.amazon.com/iam/home).
156+
153157
## License
154158

155159
Distributed under the MIT License.

Diff for: package.json

+33-18
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,43 @@
22
"name": "dynamodb",
33
"version": "0.3.6",
44
"description": "Simple DynamoDB Library for Node.js",
5-
"keywords": ["dynamo", "node", "db", "aws", "amazon"],
5+
"keywords": [
6+
"dynamo",
7+
"node",
8+
"db",
9+
"aws",
10+
"amazon"
11+
],
612
"homepage": "https://github.com/teleportd/node-dynamodb",
713
"scripts": {
814
"test": "make test"
915
},
10-
"author": { "name": "Stanislas Polu",
11-
"email": "[email protected]",
12-
"url": "http://twitter.com/spolu" },
13-
"repository" : { "type" : "git",
14-
"url" : "https://github.com/teleportd/node-dynamodb.git" },
15-
"contributors" : [ "Karl Seguin",
16-
"Juan Carlos del Valle",
17-
"Pablo Cantero",
18-
"Chris Stivers",
19-
"Juho Mäkinen",
20-
"Paul Tax",
21-
"Alex Bosworth",
22-
"Jimb Esser",
23-
"Anthony Moi" ],
16+
"author": {
17+
"name": "Stanislas Polu",
18+
"email": "[email protected]",
19+
"url": "http://twitter.com/spolu"
20+
},
21+
"repository": {
22+
"type": "git",
23+
"url": "https://github.com/teleportd/node-dynamodb.git"
24+
},
25+
"contributors": [
26+
"Karl Seguin",
27+
"Juan Carlos del Valle",
28+
"Pablo Cantero",
29+
"Chris Stivers",
30+
"Juho Mäkinen",
31+
"Paul Tax",
32+
"Alex Bosworth",
33+
"Jimb Esser",
34+
"Anthony Moi",
35+
"Alex Gorbatchev"
36+
],
2437
"dependencies": {
25-
"fwk": "0.1.x"
38+
"fwk": "^1.1.8"
2639
},
27-
"main" : "./lib/ddb",
28-
"engines" : { "node" : ">=0.4.0" }
40+
"main": "./lib/ddb",
41+
"engines": {
42+
"node": ">=0.4.0"
43+
}
2944
}

0 commit comments

Comments
 (0)