Last edit: @jkrause in #marvin-dev 1 year ago - Slack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount == nil then
  daycount = 3
end
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, unt)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,6 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

History

Revision: 2750 by @jkrause in #marvin-dev 1 year agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount == nil then
  daycount = 3
end
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, unt)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,6 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 2749 by @jkrause in #marvin-dev 1 year agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount == nil then
  daycount = 7
end
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, unt)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,6 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 1005 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, unt)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,6 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 1004 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, unt)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,5 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 1003 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local unt = nil
if daycount ~= nil and daycount > 1 then
 unt = time.now()
 unt.day = unt.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, until)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,5 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 1002 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local thing_name = argv[2]
local daycount = tonumber(argv[3])
local until = nil
if daycount ~= nil and daycount > 1 then
 until = time.now()
 until.day = until.day + daycount
end
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid, nil, until)
j = respj.events
print('Upcoming ' .. thing_name .. ':\n') 
for i=1,5 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)

Revision: 1000 by @kyork in #marvin-dev 2 years agoSlack Archive

{lua} 
-- API Docs (http://apidocs.teamup.com/)
local calid = argv[1]
local respj = funcs.teamup_events(fmap.api_keys.teamup, calid)
j = respj.events
print('Upcoming ' .. argv[2] .. ':\n') 
for i=1,5 do
if j[i] ~= nil then
local stime = time.parse(j[i].start_dt, "2006-01-02T15:04:05-07:00")
local etime = time.parse(j[i].end_dt, "2006-01-02T15:04:05-07:00")
local who = "someone..."
if j[i].who ~= "" then who = j[i].who end
print('*' .. j[i].title .. '* on ' .. stime:format("Mon 02 Jan from 3:04pm") .. etime:format(" to 3:04pm") .. '\n' .. '>Requested by ' .. who .. '\n')
else break end
end
print('See the full schedule here https://teamup.com/' .. calid)