Skip to content

Commit 71c4e20

Browse files
authored
Update README.md
1 parent f32224b commit 71c4e20

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

README.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ First of all, sheets requires download should be publish to web.
2424
Second, locate to your sheet id and sheet table index.
2525

2626
https://docs.google.com/spreadsheets/d/[SHEET_ID]/edit#gid=[SHEET_TABLE_INDEX]
27-
27+
2828
![](https://raw.githubusercontent.com/deflinhec/GodotGoogleSheet/master/screenshots/step04.png)
2929

3030
Finally, preload gsheet into your own script.
@@ -34,54 +34,54 @@ Finally, preload gsheet into your own script.
3434

3535
## :bookmark: Examples
3636

37-
### Load sheets from file.
38-
Assuming files are already exist within our local filesystem.
39-
```
40-
func _ready():
41-
var gsheet = GSheet.new()
42-
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
43-
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
44-
gsheet.start()
45-
yield(gsheet, "allset")
46-
```
47-
48-
### Download sheets from google service api.
49-
Download gsx format and convert it to json format locally.
50-
```
51-
func _ready():
52-
var gsheet = GSheet.new()
53-
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
54-
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
55-
gsheet.start()
56-
gsheet.download()
57-
yield(gsheet, "allset")
58-
```
59-
60-
### Download sheets from google service api through [gsx2json](http://gsx2json.com/).
61-
Addition layer bridges between game and google service, converting gsx format to json remotely and also reduces significant large amount of bytes.
62-
```
63-
func _ready():
64-
var host = GSheet.Gsx2Json.new("gsx2json.com", 80)
65-
var gsheet = GSheet.new(host)
66-
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
67-
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
68-
gsheet.start()
69-
gsheet.download()
70-
yield(gsheet, "allset")
71-
```
72-
73-
### Two step download procedure.
74-
Request file size and prompt user before actual download.
75-
```
76-
var gsheet = GSheet.new()
77-
78-
func _ready():
79-
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
80-
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
81-
gsheet.start()
82-
gsheet.download_request()
83-
84-
func _on_Button_pressed():
85-
gsheet.download()
86-
yield(gsheet, "allset")
87-
```
37+
- ### Load sheets from file.
38+
Assuming files are already exist within our local filesystem.
39+
```
40+
func _ready():
41+
var gsheet = GSheet.new()
42+
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
43+
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
44+
gsheet.start()
45+
yield(gsheet, "allset")
46+
```
47+
48+
- ### Download sheets from google service api.
49+
Download gsx format and convert it to json format locally.
50+
```
51+
func _ready():
52+
var gsheet = GSheet.new()
53+
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
54+
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
55+
gsheet.start()
56+
gsheet.download()
57+
yield(gsheet, "allset")
58+
```
59+
60+
- ### Download sheets from google service api through [gsx2json](http://gsx2json.com/).
61+
Addition layer bridges between game and google service, converting gsx format to json remotely and also reduces significant large amount of bytes.
62+
```
63+
func _ready():
64+
var host = GSheet.Gsx2Json.new("gsx2json.com", 80)
65+
var gsheet = GSheet.new(host)
66+
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
67+
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
68+
gsheet.start()
69+
gsheet.download()
70+
yield(gsheet, "allset")
71+
```
72+
73+
- ### Two step download procedure.
74+
Request file size before actual download.
75+
```
76+
var gsheet = GSheet.new()
77+
78+
func _ready():
79+
var save_data_path = "[YOUR_PATH]/[YOUR_FILE_NAME].json"
80+
gsheet.queue(save_data_path, "[SHEET_ID]", [SHEET_TABLE_INDEX])
81+
gsheet.start()
82+
gsheet.download_request()
83+
84+
func _on_Button_pressed():
85+
gsheet.download()
86+
yield(gsheet, "allset")
87+
```

0 commit comments

Comments
 (0)