Skip to content

Commit 06d7283

Browse files
authored
Update README.md
1 parent 75c975a commit 06d7283

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The library and your script template must be shared.
5959
| getScriptFiles | Retrieves a list of files associated with a script based on its script_id. |
6060
| getTemplateScriptFiles | Fetches a list of template files (script_id of the template is defined in the script properties, default template id is set to the library's id). |
6161
| assignTemplate | Initializes the class and sets the ID of the template script as the data source. |
62+
| createCalleeMap | Generates a map representing function calls within a script, with an option to visualize it. |
6263

6364
\* - makes changes to the script file
6465

@@ -76,12 +77,16 @@ The library and your script template must be shared.
7677
| getChanges | Retrieves a list of changes that will be applied to the script upon committing. |
7778
| getTemplateId | Retrieves the current ID of the script's template. |
7879
| **Operations** |
79-
| AddNewFile | Adds a new file or replaces an existing one within the script. |
80+
| AddNewFile | Adds a new file from the script template to the user script, replacing any existing file with the same name. |
8081
| renameFile | Renames a file within the script. |
8182
| deleteFile | Deletes a file from the script file object. |
8283
| compareFilesByContent | Compares the content of two files and returns true if they are identical, false otherwise. |
8384
| createBlankFile | Creates a new blank file within the script. |
8485
| setCustomSource | Sets the content of the source in a file within the script. |
86+
| **Appsscript** |
87+
| getLibraryInfo | Retrieves information about a library from the user script or template. |
88+
| updateLibraryInfo | Updates library information in the user script file. |
89+
| **Additional** |
8590
| addFileToUserJson | Adds a file to the user's script. |
8691
| getFileFromTemplate | Retrieves a file from the template script file object. |
8792

@@ -111,7 +116,7 @@ appsscript file, json:
111116
{
112117
"userSymbol": "ScriptSync",
113118
"libraryId": "1nUiajCHQReVwWPq7rNAvsIcWvPptmMUSzeytnzVHDpdoxUIvuX0e_reL",
114-
"version": "5"
119+
"version": "6"
115120
}
116121
]
117122
},
@@ -290,6 +295,20 @@ function do(e) {
290295
}
291296
```
292297
298+
### Sample 5: Set a specific library version in the script with updateLibraryInfo() method
299+
```javascript
300+
function updateLibraryVersion() {
301+
// assign the template
302+
const updater = ScriptSync.assignTemplate();
303+
const library_id = "your_library_id";
304+
305+
updater.updateLibraryInfo(
306+
{libraryId: library_id, version: "5"}
307+
).commit();
308+
}
309+
```
310+
311+
293312
# Restrictions
294313
295314
PLEASE EXERCISE CAUTION WHEN RENAMING AND DELETING FILES!
@@ -327,6 +346,12 @@ If you have any questions and commissions for me, feel free to tell me.
327346
328347
# Update History
329348
349+
- v2.0.6 (May 19, 2024)
350+
351+
1. Added new methods:
352+
- File operations: 2 methods of [getLibraryInfo](#methods_class) and [updateLibraryInfo](#methods_class) were added.
353+
- [createCalleeMap](#methods) method.
354+
330355
- v2.0.5 (May 13, 2024)
331356
332357
1. Added new methods:

0 commit comments

Comments
 (0)