Skip to content

Commit 8c53008

Browse files
author
Jerome Louvel
committed
Update README.md
Simplified text style
1 parent 2e93e71 commit 8c53008

1 file changed

Lines changed: 20 additions & 31 deletions

File tree

modules/org.restlet.tutorial.webapi/README.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
* Git installed on your machine
88

9-
> The implementation is located [here](https://github.com/restlet/restlet-tutorial/tree/master/modules/org.restlet.tutorial.webapi)
10-
> You can clone this repository; the source code is located in `/modules/org.restlet.tutorial.webapi/` folder.
9+
The implementation is located [here](https://github.com/restlet/restlet-tutorial/tree/master/modules/org.restlet.tutorial.webapi). You can clone this repository; the source code is located in `/modules/org.restlet.tutorial.webapi/` folder.
1110

12-
> This example uses [Restlet Framework 2.3.0](http://restlet.com/download/current) (Java SE edition)
13-
and [H2 Database](www.h2database.com)
11+
This example uses [Restlet Framework 2.3.0](http://restlet.com/download/current) (Java SE edition)
12+
and [H2 Database](www.h2database.com).
1413

15-
> Restlet Framework's User Guide is available [here](http://restlet.com/technical-resources/restlet-framework/guide/2.3/).
14+
Restlet Framework's User Guide is available [here](http://restlet.com/technical-resources/restlet-framework/guide/2.3/).
1615

1716
## Installation
1817

@@ -23,7 +22,7 @@ To install the Maven project:
2322
* Execute `mvn clean install`
2423
* For eclipse users : run `mvn eclipse:eclipse`
2524

26-
> For further instruction about running a Maven project : [Building a project with Maven](http://maven.apache.org/run-maven/index.html)
25+
For further instruction about running a Maven project : [Building a project with Maven](http://maven.apache.org/run-maven/index.html)
2726

2827
### Run this application
2928

@@ -42,11 +41,9 @@ To simplify the launch of the application, authentication and authorization are
4241
* owner/owner : to get owner role
4342
* user/user : to get user role
4443

45-
It uses HTTP Basic authentication.
44+
It uses HTTP Basic authentication. Learn more about authentication, authorization and security with Restlet Framework [here](http://restlet.com/learn/guide/2.3/core/security/).
4645

47-
> Learn more about authentication, authorization and security with Restlet Framework [here](http://restlet.com/learn/guide/2.3/core/security/).
48-
49-
> You can try this application easily with a REST client like [POSTMAN](http://www.getpostman.com/).
46+
You can try this application easily with a REST client like [POSTMAN](http://www.getpostman.com/).
5047

5148
## Database access
5249

@@ -55,15 +52,14 @@ To visualize the database, open the H2 console in you browser (`http://localhost
5552
## Description
5653

5754
This Web API contains 2 main resources :
58-
5955
* Company : identified by an auto-generated id.
6056
* Contact : identified by its email. A contact can be part of a company and get a reference to it.
6157

6258
This is a diagram of the API :
6359

6460
![Diagram](https://github.com/restlet/restlet-tutorial/blob/master/modules/org.restlet.tutorial.webapi/images/RFWebAPIReferenceImplementation.png)
6561

66-
> A Web API definition can be generated with [APISpark extension (RF 2.3)](http://restlet.com/learn/guide/2.3/extensions/apispark).
62+
A Web API definition can be generated with [APISpark extension (V2.3)](http://restlet.com/learn/guide/2.3/extensions/apispark).
6763

6864
## Implementation choices
6965

@@ -76,7 +72,6 @@ This is a diagram of the API :
7672
## Next steps
7773

7874
Here are some instructions to go further with this project:
79-
8075
* Persistence layer
8176
* For each operation a new connection is created.
8277
It would be useful to use a connection pool like [DBCP](http://commons.apache.org/proper/commons-dbcp/) or the built-in connection pool of your database's JDBC driver if available.
@@ -92,7 +87,7 @@ Here are some instructions to go further with this project:
9287

9388
## Usage
9489

95-
> These examples are made using the JSON format but you can use XML or YAML if you want.
90+
These examples are made using the JSON format but you can use XML or YAML if you want.
9691

9792
### Ping resource
9893

@@ -102,7 +97,7 @@ A resource `/ping` has been created which does not need authentication.
10297

10398
It should return the ```Version: 1.0.0 running``` text in the HTTP response body.
10499

105-
> For the following examples, Basic Authentication is required
100+
For the following examples, Basic Authentication is required.
106101

107102
### Create a company
108103

@@ -121,17 +116,15 @@ It should return the ```Version: 1.0.0 running``` text in the HTTP response body
121116
}
122117
```
123118

124-
> The returned status is : `201 Created`.
125-
126-
NOTE: the location of the created company is written is the "Location" HTTP header.
119+
The returned status is : `201 Created`. Note that the location of the created company is written is the "Location" HTTP header.
127120

128121
### Retrieve all created companies
129122

130123
```GET http://localhost:9000/v1/companies/```
131124

132125
> The trailing slash is optional : both `http://localhost:9000/v1/companies/` and `http://localhost:9000/v1/companies` will work.
133126
134-
It should retrieve :
127+
It should retrieve :
135128

136129
```json
137130
{
@@ -163,16 +156,15 @@ NOTE: the location of the created company is written is the "Location" HTTP head
163156
}
164157
```
165158

166-
> The `self` element refers to the location of the object : `http://localhost:9000/v1/companies/3`.
167-
> Try `GET http://localhost:9000/v1/companies/3` !
159+
The `self` element refers to the location of the object : `http://localhost:9000/v1/companies/3`. Try `GET http://localhost:9000/v1/companies/3`!
168160

169161
### Create a contact related to the created company
170162

171163
```PUT http://localhost:9000/v1/contacts/{email}```
172164

173-
with `{email}` representing the email of the contact you want to insert.
165+
with `{email}` representing the email of the contact you want to insert.
174166

175-
For this example, it is:
167+
For this example, it is:
176168
``` PUT http://localhost:9000/v1/contacts/gblondeau@restlet.com```
177169

178170
```json
@@ -196,18 +188,15 @@ You should get back:
196188
}
197189
```
198190

199-
> The returned status is : `201 Created`.
191+
The returned status is : `201 Created`.
200192

201-
> The property company is a reference to the location of the company, with 1 the id of the company.
202-
ie : /companies/1 refers to http://localhost:9000/v1/companies/1
193+
The property company is a reference to the location of the company, with 1 the id of the company. ie : /companies/1 refers to http://localhost:9000/v1/companies/1
203194

204195
### Retrieve the list of created contacts
205196

206197
```GET http://localhost:9000/v1/contacts```
207198

208-
> The trailing slash is optional : both ```http://localhost:9000/v1/contacts/``` and ```http://localhost:9000/v1/contacts``` will work.
209-
210-
It should retrieve :
199+
The trailing slash is optional : both ```http://localhost:9000/v1/contacts/``` and ```http://localhost:9000/v1/contacts``` will work. It should retrieve :
211200

212201
```json
213202
{
@@ -225,7 +214,7 @@ It should retrieve :
225214
}
226215
```
227216

228-
> The property company is a reference to the location of the company
217+
The property company is a reference to the location of the company.
229218

230219
To display the company information, add the following query parameter : ```?strategy=load```
231220

@@ -284,4 +273,4 @@ It should retrieve:
284273
}
285274
```
286275

287-
> This time a ```200 OK ``` is returned because it is not a creation but an update.
276+
This time a ```200 OK ``` is returned because it is not a creation but an update.

0 commit comments

Comments
 (0)