Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 75 lines (42 sloc) 2.135 kb
c981532 @guilhermesilveira renaming to js
guilhermesilveira authored
1 h1. Restfulie Javascript
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
2
63f9c50 @guilhermesilveira describing how to test
guilhermesilveira authored
3 "Visit the official website":http://restfulie.caelumobjects.com for <b>documentation</b>, videos and other versions.
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
4
79c32d0 @cairesvs making build more simple and change on readme
cairesvs authored
5 <pre><script type="text/javascript" charset="utf-8" src="restfulie.js"></script></pre>
39de403 @cairesvs build file, update readme, some refactors to run convertrs
cairesvs authored
6
977b2e9 @cairesvs fixing readme
cairesvs authored
7 or :
39de403 @cairesvs build file, update readme, some refactors to run convertrs
cairesvs authored
8
79c32d0 @cairesvs making build more simple and change on readme
cairesvs authored
9 <pre><script type="text/javascript" charset="utf-8" src="restfulie.min.js"></script></pre>
39de403 @cairesvs build file, update readme, some refactors to run convertrs
cairesvs authored
10
ef99d12 @euprogramador created example for access twitter api, Fixed bug when Discovery links.
euprogramador authored
11 This project required jquery your project.
12
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
13 h2. A simple get
14
f07c6be @cairesvs moar changes on readme
cairesvs authored
15 <pre>resource = Restfulie.at(url).accepts('application/json').get();</pre>
dbdbd7c @guilhermesilveira moving readme to textile root
guilhermesilveira authored
16
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
17 h2. A simple post
368878e @guilhermesilveira adding pre tags
guilhermesilveira authored
18
08d1a9a @cairesvs moar changes on readme
cairesvs authored
19 <pre>x = {'price':11};
20 result = Restfulie.at(url).as("application/json").post(x);</pre>
dbdbd7c @guilhermesilveira moving readme to textile root
guilhermesilveira authored
21
ef99d12 @euprogramador created example for access twitter api, Fixed bug when Discovery links.
euprogramador authored
22 h2. Checking the result
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
23
368878e @guilhermesilveira adding pre tags
guilhermesilveira authored
24 <pre>
9bbb761 @guilhermesilveira merging with readme change
guilhermesilveira authored
25 resource = Restfulie.at(url).accepts('application/json').get();
26 resource = Restfulie.at(url).as('application/json').post(resource);
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
27
9bbb761 @guilhermesilveira merging with readme change
guilhermesilveira authored
28 console.log(resource.response.body) # the response body
29 console.log(resource.response.code) # the response code
368878e @guilhermesilveira adding pre tags
guilhermesilveira authored
30 </pre>
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
31
7d67a42 @guilhermesilveira team and docs
guilhermesilveira authored
32 h1. Team
33
ef99d12 @euprogramador created example for access twitter api, Fixed bug when Discovery links.
euprogramador authored
34 Restfulie Javascript was created by "Carlos Alberto":http://progdicas.blogspot.com and has received contributions from:
7d67a42 @guilhermesilveira team and docs
guilhermesilveira authored
35
36 "Guilherme Silveira":http://restfulie.caelumobjects.com (Restfulie project leader)
4be261e @ricardovaleriano header link now is a restfulie resource
ricardovaleriano authored
37 "Ricardo Valeriano":http://www.ricardovaleriano.com.br
31fe589 @cairesvs fixing link on readme
cairesvs authored
38 "Caires Santos":http://twitter.com/cairesvs
63f9c50 @guilhermesilveira describing how to test
guilhermesilveira authored
39
40 h1. How to build for development
41
42 First you got to install "nodejs":http://nodejs.org/#download
43
44 For the next steps you'll need "npm":http://npmjs.org/
45
46 With npm installed you must install node-jake:
47 <pre>npm install jake</pre>
48
49 Now install UglifyJS:
50 <pre>npm install uglify</pre>
51
52 Run jake to build the Restfulie package uncompressed or minified.
53
54 <pre>jake</pre>
55
56 h2. Testing
7d67a42 @guilhermesilveira team and docs
guilhermesilveira authored
57
e0e21d1 @cairesvs adding more informations about the tests on readme
cairesvs authored
58 To run your unit tests execute:
7d67a42 @guilhermesilveira team and docs
guilhermesilveira authored
59
63f9c50 @guilhermesilveira describing how to test
guilhermesilveira authored
60 <pre>open client/tests/convertersTest.html</pre>
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
61
e0e21d1 @cairesvs adding more informations about the tests on readme
cairesvs authored
62 For integration tests:
63
64 h3. Restbuy and Proxifier
65
66 First things first execute <pre>git submodule init</pre> and <pre>git submodule update</pre> after that <pre>bundle install</pre> to grab all the gems.
67
68 Go to Proxifier dir and execute <pre>bundle install</pre>.
69
70 Be sure you have "Restbuy":https://github.com/caelum/restfulie-restbuy and Proxifier running properly and after that just execute <pre>test.sh</pre> script
71
7017d1f @guilhermesilveira adding basic license and readme
guilhermesilveira authored
72 h1. License
73
74 Restfulie is licensed under the Apache License, Version 2.0.
Something went wrong with that request. Please try again.