Skip to content

Commit d8af6c1

Browse files
committed
Added services data JSON file and Updated README for developers.
1 parent 5be6466 commit d8af6c1

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
11
# doc-viewer-api-interface
2+
The project is not in development and not yet ready for production.
3+
# API
4+
`/viewer/index.html?url=http://anotherdomain.com/file.docx`
5+
6+
## Tasks
7+
8+
1. Supported API's and file formats supported by them are listed in `config/services.json`.
9+
2. Read the url parameter passed to the html page and should open it in an iFrame passing it to supported API.
10+
11+
# Notes for Developers
12+
13+
- If you have any issues, create an issue on project's [github page](https://github.com/parishod/doc-viewer-api-interface/issues)
14+
- You may modify the code and create a pull request before merging.
15+
- Keep code clean:
16+
- Use lint and recommended code formatting tools
17+
- Avoid code comments
18+
- Avoid inline JS and CSS
19+
- Do NOT use any libraries/frameworks unless necessary.
20+
- Try using modern language features (like ES6) but make sure they are at least supported by browser versions released five months earlier. Or use transpilers (like Babel for Javascript)
21+
22+
## Style guides
23+
- [JavaScript style guide by Airbnb](https://github.com/airbnb/javascript)

config/services.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"application":{
3+
"name":"Doc Viewer API Interface",
4+
"app_id":"github.com/parishod/doc-viewer-api-interface",
5+
"version":"v0.1"
6+
},
7+
"data":{
8+
"version":0.1,
9+
"services":[
10+
{
11+
"name":"Google Docs",
12+
"id":"google_docs",
13+
"is_supported":true,
14+
"file_extensions":[
15+
"ai",
16+
"csv",
17+
"doc",
18+
"docx",
19+
"dxf",
20+
"eps",
21+
"odp",
22+
"ods",
23+
"odt",
24+
"pages",
25+
"pdf",
26+
"pps",
27+
"ppt",
28+
"pptx",
29+
"ps",
30+
"psd",
31+
"rtf",
32+
"sxc",
33+
"sxi",
34+
"sxw",
35+
"tif",
36+
"tiff",
37+
"ttf",
38+
"wpd",
39+
"xls",
40+
"xlsx",
41+
"xps"
42+
],
43+
"file_open_API":"https://docs.google.com/viewer?url={$file_url}&embedded=false&chrome=false&dov=1"
44+
},
45+
{
46+
"name":"Microsoft Office Online",
47+
"id":"mso_online",
48+
"is_supported":true,
49+
"file_extensions":[
50+
"doc",
51+
"docx",
52+
"ppt",
53+
"pptx",
54+
"xls",
55+
"xlsx"
56+
],
57+
"file_open_API":"https://docs.google.com/viewer?url={$file_url}&embedded=false&chrome=false&dov=1"
58+
},
59+
{
60+
"name":"rollApp",
61+
"id":"roll_app",
62+
"is_supported":true,
63+
"file_extensions":[
64+
"zip",
65+
"rar"
66+
],
67+
"file_open_API":"https://www.rollapp.com/api/apps/open?file_url={$file_url}"
68+
}
69+
]
70+
}
71+
}

0 commit comments

Comments
 (0)