Skip to content

Commit

Permalink
add some doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed May 11, 2012
1 parent 9651115 commit c910d10
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 0 deletions.
47 changes: 47 additions & 0 deletions doc/webapi-html.txt
@@ -0,0 +1,47 @@
*webapi-html.txt* HTML parser written in pure vimscript.

Maintainer: mattn <mattn.jp@gmail.com>

==============================================================================
CONTENTS *webapi-html-contents*

INTRODUCTION |webapi-html-introduction|
INTERFACE |webapi-html-interface|
Functions |webapi-html-functions|
Structures |webapi-html-structures|

==============================================================================
INTRODUCTION *webapi-html-introduction*

*webapi-html* is HTML parser Library.

==============================================================================
INTERFACE *webapi-html-interface*
------------------------------------------------------------------------------
FUNCTIONS *webapi-html-functions*

parse(content) *webapi-html.parse()*
Parse content into DOM object.

parseFile(file) *webapi-html.parseFile()*
Parse html file into DOM object.

parseURI(url) *webapi-html.parseURI()*
Get and parse html into DOM object.

------------------------------------------------------------------------------
STRUCTURES *webapi-html-structures*

DOM object is structured as |Directory| like following.
>
{
"name": "a",
"attr": {
"href": "http://example.com",
"title": "example",
},
"child": [...]
}
<
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl
53 changes: 53 additions & 0 deletions doc/webapi-http.txt
@@ -0,0 +1,53 @@
*webapi-http.txt* simple HTTP client library.

Maintainer: mattn <mattn.jp@gmail.com>

==============================================================================
CONTENTS *webapi-http-contents*

INTRODUCTION |webapi-http-introduction|
INTERFACE |webapi-http-interface|
Functions |webapi-http-functions|
Response |webapi-http-response|

==============================================================================
INTRODUCTION *webapi-http-introduction*

*webapi-http* is HTTP Utilities Library. It provides simple HTTP client.

==============================================================================
INTERFACE *webapi-http-interface*
------------------------------------------------------------------------------
FUNCTIONS *webapi-http-functions*

get(url, param, header) *webapi-http.get()*
Send GET request to url.

post(url, param, header) *webapi-http.post()*
Send POST request to url.

encodeURI(param) *webapi-http.encodeURI()*
Encode params as URI query.

decodeURI(str) *webapi-http.decodeURI()*
Decode string as URI params.

encodeURIComponent(str) *webapi-http.encodeURIComponent()*
Encode param as URI components.

------------------------------------------------------------------------------
RESPONSE *webapi-http-response*

|webapi-http.get| and |webapi-http.post| return data structure as
|Directory| like following.
>
{
"header": [
"Content-Type: text/html",
"Content-Length: 310"
],
"content": "<html> ....."
}
<
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl
29 changes: 29 additions & 0 deletions doc/webapi-json.txt
@@ -0,0 +1,29 @@
*webapi-json.txt* JSON parser written in pure vimscript.

Maintainer: mattn <mattn.jp@gmail.com>

==============================================================================
CONTENTS *webapi-json-contents*

INTRODUCTION |webapi-json-introduction|
INTERFACE |webapi-json-interface|
Functions |webapi-json-functions|

==============================================================================
INTRODUCTION *webapi-json-introduction*

*webapi-json* is JSON parser Library.

==============================================================================
INTERFACE *webapi-json-interface*
------------------------------------------------------------------------------
FUNCTIONS *webapi-json-functions*

encode(object) *webapi-json.encode()*
Encode object into JSON string.

decode(json) *webapi-json.decode()*
Decode JSON string into variable that vim can treat.

==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl
47 changes: 47 additions & 0 deletions doc/webapi-xml.txt
@@ -0,0 +1,47 @@
*webapi-xml.txt* XML parser written in pure vimscript.

Maintainer: mattn <mattn.jp@gmail.com>

==============================================================================
CONTENTS *webapi-xml-contents*

INTRODUCTION |webapi-xml-introduction|
INTERFACE |webapi-xml-interface|
Functions |webapi-xml-functions|
Structures |webapi-xml-structures|

==============================================================================
INTRODUCTION *webapi-xml-introduction*

*webapi-xml* is XML parser Library.

==============================================================================
INTERFACE *webapi-xml-interface*
------------------------------------------------------------------------------
FUNCTIONS *webapi-xml-functions*

parse(content) *webapi-xml.parse()*
Parse content into DOM object.

parseFile(file) *webapi-xml.parseFile()*
Parse html file into DOM object.

parseURI(url) *webapi-xml.parseURI()*
Get and parse html into DOM object.

------------------------------------------------------------------------------
STRUCTURES *webapi-xml-structures*

DOM object is structured as |Directory| like following.
>
{
"name": "a",
"attr": {
"href": "http://example.com",
"title": "example",
},
"child": [...]
}
<
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl

0 comments on commit c910d10

Please sign in to comment.