Giter VIP home page Giter VIP logo

4d-google-workspace's People

Contributors

macmikey avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

4d-google-workspace's Issues

reduce network activity

know the current status of the sheet, current range, etc., before loading, again
possibly use developer metadata api

error handling

i am calling my own personal error handlers, but that won't make for a good component since i save the records in a table, and components can't have regular 4d tables.
i think the user is going to want to be able to send output to their own error handlers if they are going to submodule and throw in the components folder.

batchUpdate

I am really beating around the bush on implementing a more general version of this
there are many different sheet requests that should probably be managed via properties being changed and then sent back

token timeout

  • test - might come over as an error call. should set up a daemon to run for a while until we fail

update props in docs

  • appendValues
  • createSpreadsheet
  • copySheetToSpreadsheet
  • duplicateSheet
  • entitySelectionToCollection
  • findSheetWithName
  • getSheetNames
  • getValues
  • load
  • parseError
  • renameSheet
  • setValues

does object layout match google's?

especially for values for a sheet, i think we added a separate property tree.
i think what we should do, instead is add a reference to the current sheet, and leave the object intact, so the dev can modify the object directly, and the code for future development of the class is clearer and more straightforward (and it's easier to communicate with the google API)

find blank row

like when trying to find the bottom of a table
useful when trying to read data

Here's doing it one way

$blankRowNumber:=$dataRow  // starting to look on $dataRow
$done:=False
For each ($rowData; $values.values; $dataRow) Until ($done)
    While ($rowData.length<=$commentCol)
        $rowData.push("")
    End while   //($rowData.length<=($commentCol+1))
						
    If ((String($rowData[$dateCol])#"") |\
        (String($rowData[$psCol])#"") |\
        (String($rowData[$shipCol])#"") |\
        (String($rowData[$recCol])#""))  //skip comments column b/c it might be undefined.
        $blankRowNumber:=$blankRowNumber+1
    Else 
        $done:=True
    End if   // ((String($rowData[$dateCol])="") & (String($rowData[$psCol])="") & (String($rowData[$shipCol])="") & (String($rowData[$recCol])="") & (String($rowData[$commentCol])=""))
End for each   //($rowData;$values.values) Until ($done)

padrows()

in the api description, google says that, in effect, rows will not be padded to get the right number of columns. either add code to the fetch or add separate code to get the collection to the dimension specified.
should we go both rows and columns?

reverse order

make it easier to insert on top and push down
might also want to be able to just add to the top, i.e. a "reverse append" - but it isn't really a reverse append b/c we'd want to maintain the existing header rows, and insert under them.

add getEvent()

pull a paticular event from the calendar. how we get it isn't relelvant, that's up to the calendar to either have the events preloaded or to grab it from the server.

deconflict drive_file s

  • break it with a non-unique name
  • develop a tool to deconfilct
    might be able to do it by passing a path - if more than one match, error, and then dev can throw a path in, which we can traverse to deconflict.

singleton Auth

Class constructor
	$class:=OB Class(This)
	$me:=$class.me
	If ($me=Null)
		$me:=OB Copy(This; ck shared; $class)
		Use ($class)
			$class.me:=$me
			$class.new:=Formula(This.me)
		End use 
	End if   //$instance=null

overwrite existing values

if i throw a subset over the wall, all the other data in the sheet should disappear
especially if i specify the full range

combine create sheet from template and move it into one function

$s := cs.spreadsheet.new ( $auth )
$properties := New object ( "title" ; "test spreadsheet" )
$s.spreadsheet := New object ( "properties" ; $properties )
$templateSS := cs.spreadsheet.new ( $auth ; $templateURL )
$templateSS.load ( "TEMPLATE" ; True ) // in the TEMPLATE sheet, load the grid data, which includes the cell metadata
$s.spreadsheet.sheets := $templateSS.sheetData.sheets // deep-copies the TEMPLATE sheet into the new spreadsheet
$success := $s.createSpreadsheet ()
ASSERT ($success)
// spreadsheet is at the root folder. Now, move it.

$ssID:=$s._spreadsheetId
$ssf := cs.google.driveFile.new ( $auth ; $ssID )  // the spreadsheet file
$fs := cs.google.driveFiles.new ( $auth ; "inspection logs" ; "folder" )  // find the folder with the name "inspection logs"
$numMatches := $fs.files.length
ASSERT ( $numMatches = 1 )

$folderID := $fs.getID()
ASSERT ( $folderID # Null )

$success := $ssf.moveTo ( $folderID )
ASSERT($success)

collapse code

it looks like a lot of this code is going to be similar

  1. handle params /build query string - probably could do with a specifier as to what the different pieces are
  2. build the url
  3. do the query and return something

calendar api

  • select cal
  • create cal
  • list events
  • add event
  • delete event
  • authenticate…
  • modify event
  • calendar list vs. calendar get
  • other calendar methods
  • other event methods
  • support paging

simpler use

  • pass an entity selection
  • it's already pretty straightforward to use a collection, but you have to assign the object .values, first.

sheet names getting borked

getSheetnames() works until i duplicate the sheet? set values for the sheet?
then the structure breaks and the function doesn't work b/c the props have changed.

error handling

  • failed auth
  • failed call to google
  • add via asserts and error routines?
  • 404, address invalid (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.