Diff: [root] @ c09b165d4fc | faq | css

Metamail stuff

File: hellnet/protocols/http/index [Diff]

diff --git a/hellnet/protocols/http/index b/hellnet/protocols/http/index
index 82843c1..affe4f7 100644
-- a/hellnet/protocols/http/index
++ b/hellnet/protocols/http/index
@@ -5,7 +5,8 @@ Peers are passing queries via HTTP queries (like GET /chunks/0a/04588fab48f or P
h2. Query types

|_. Query |_. Path |_. Static/dynamic |_. Description |_. More info |
\ No newline at end of file
| GET | @/chunks/([0-9a-f]+)@ | static | [[/hellnet/tech/chunk|Chunk]] with hash $1 | [[http/chunk]] [[chunk]] |
| GET | @/meta/([^/]+)/([^/]+)@ | static | List of chunks which are inserted with [[/hellnet/tech/metachunks|meta]] $1:$2 | [[http/meta]] [[meta]] |
| GET, HEAD | @/hello@ | static | Check whether node is up | [[http/hello]] [[hello]] |
| POST | @/handshake@ | dynamic | Establish a link to node | [[http/handshake]] [[handshake]] |
\ No newline at end
| GET | @/metamail/sync@ | dynamic | Get the list of file [[../../metamail|metamail]] bundles | [[metamail/sync]] |
\ No newline at end of file

File created: 33188 hellnet/protocols/http/metamail/sync [Diff]

diff --git a/hellnet/protocols/http/metamail/sync b/hellnet/protocols/http/metamail/sync
new file mode 100644
index 0000000..ea7e59d
-- /dev/null
++ b/hellnet/protocols/http/metamail/sync
@@ -0,0 +1,29 @@
h1. @metamail/sync@ resource

h2. Brief description

Get all the metamail bundles from your last sync.

h2. Requests

h3. GET

h4. Parameters

None

h4. Description

This request is used to check for new metamail since last contact. Results in newline-separated list of numbers like 1250968044, which are UNIX timestamps for metamail bundles. Client then can retrieve that bundle by path like @/metamail/1250968044@. After retrieval of all those, client can @POST /metamail/synced@ for server to reset the last contact time ([[synced|more info]]).

h4. Response

Newline-separated list of bundles' names. Example:

bc. 1250968044
1250968046
1250968047
1250968048
1250968049
1250968050
1250968051
\ No newline at end of file

File created: 33188 hellnet/protocols/http/metamail/synced [Diff]

diff --git a/hellnet/protocols/http/metamail/synced b/hellnet/protocols/http/metamail/synced
new file mode 100644
index 0000000..b7371e6
-- /dev/null
++ b/hellnet/protocols/http/metamail/synced
@@ -0,0 +1,17 @@
h1. @metamail/synced@ resource

h2. Brief description

Report successfully downloaded metamail bundles to node.

h2. Requests

h3. POST

h4. Parameters

* lastBundle - name of last (sorted by value in ascending order) bundle downloaded.

h4. Description

This resource is requested when client had downloaded all the bundles. Server recalculates last contact time based on lastBundle and returns list of remaining bundles (acts as [[metamail/sync]]). If the list is empty, transaction can be finished, otherwise client should download all the bundles and request this resource again.
\ No newline at end of file

By Voker57 on 2009-08-23 01:16:41 +0400 Powered by bitcheese wiki engine