Edits history of script submission #23349 for ' List Time Zones (ms_outlook)'

  • bunnative
    One script reply has been approved by the moderators
    Ap­pro­ved
    //native
    
    /**
     * List Time Zones
     * List the time zones the connected mailbox supports, as Windows names (`Pacific Standard Time`) or IANA names (`America/Los_Angeles`). Either form is accepted wherever a script takes `time_zone`. Requires User.Read (a connection default).
     */
    export async function main(
      auth: RT.MsOutlook,
      standard: "Windows" | "Iana" = "Iana"
    ) {
      const response = await fetch(
        `https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'${standard}')`,
        {
          headers: {
            Authorization: `Bearer ${auth.token}`,
            Accept: "application/json",
          },
        }
      )
    
      if (!response.ok) {
        throw new Error(`${response.status} ${await response.text()}`)
      }
    
      return await response.json()
    }
    

    Submitted by hugo989 2 hours ago

  • bunnative
    //native
    
    /**
     * List Time Zones
     * List the time zones the connected mailbox supports, as Windows names (`Pacific Standard Time`) or IANA names (`America/Los_Angeles`). Either form is accepted wherever a script takes `time_zone`. Requires User.Read (a connection default).
     */
    export async function main(
      auth: RT.Outlook,
      standard: "Windows" | "Iana" = "Iana"
    ) {
      const response = await fetch(
        `https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'${standard}')`,
        {
          headers: {
            Authorization: `Bearer ${auth.token}`,
            Accept: "application/json",
          },
        }
      )
    
      if (!response.ok) {
        throw new Error(`${response.status} ${await response.text()}`)
      }
    
      return await response.json()
    }
    

    Submitted by hugo989 11 hours ago

  • bunnative
    //native
    
    /**
     * List Time Zones
     * List the time zones the connected mailbox supports, as Windows names (`Pacific Standard Time`) or IANA names (`America/Los_Angeles`). Either form is accepted wherever a script takes `time_zone`. Requires User.Read (the connection default).
     */
    export async function main(
      auth: RT.Outlook,
      standard: "Windows" | "Iana" = "Iana"
    ) {
      const response = await fetch(
        `https://graph.microsoft.com/v1.0/me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'${standard}')`,
        {
          headers: {
            Authorization: `Bearer ${auth.token}`,
            Accept: "application/json",
          },
        }
      )
    
      if (!response.ok) {
        throw new Error(`${response.status} ${await response.text()}`)
      }
    
      return await response.json()
    }
    

    Submitted by hugo989 11 hours ago