Edits history of script submission #53 for ' Get Values (gsheets)'

  • deno
    One script reply has been approved by the moderators
    Ap­pro­ved
    type Gsheets = {
      token: string;
    };
    export async function main(
      gsheets_auth: Gsheets,
      spreadsheetId: string,
      worksheet_name: string,
    ) {
      const token = gsheets_auth["token"];
    
      const GET_VALUES_URL = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
      const response = await fetch(GET_VALUES_URL, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + token,
          "Content-Type": "application/json",
        },
      });
    
      return await response.text();
    }
    

    Submitted by hugo697 385 days ago

  • deno
    type Gsheets = {
      token: string;
    };
    export async function main(
      gsheets_auth: Gsheets,
      spreadsheetId: string,
      worksheet_name: string,
    ) {
      const token = gsheets_auth["token"];
    
      const GET_VALUES_URL = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
      const response = await fetch(GET_VALUES_URL, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + token,
          "Content-Type": "application/json",
        },
      });
    
      return await response.text();
    }
    

    Submitted by admin 1017 days ago

  • deno
    
    type Gsheets = {
      token: string;
    };
    export async function main(
        gsheets_auth: Gsheets,
        spreadsheetId: string,
        worksheet_name: string
    ) {
        const token = gsheets_auth["token"];
    
        const GET_VALUES_URL =
            `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
        const response = await fetch(GET_VALUES_URL, {
            method: "GET",
            headers: {
                Authorization: "Bearer " + token,
                "Content-Type": "application/json",
            },
        });
    
        return await response.text();
    }

    Submitted by admin 1021 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
        gsheets_auth: wmill.Resource<"gsheets">,
        spreadsheetId: string,
        worksheet_name: string
    ) {
        const token = gsheets_auth["token"];
    
        const GET_VALUES_URL =
            `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
        const response = await fetch(GET_VALUES_URL, {
            method: "GET",
            headers: {
                Authorization: "Bearer " + token,
                "Content-Type": "application/json",
            },
        });
    
        return await response.text();
    }

    Submitted by adam186 1149 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
        gsheets_auth: wmill.Resource<"gsheets">,
        spreadsheetId: string,
        worksheet_name: string
    ) {
        const token = gsheets_auth["token"];
    
        const GET_VALUES_URL =
            `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
        const response = await fetch(GET_VALUES_URL, {
            method: "GET",
            headers: {
                Authorization: "Bearer " + token,
                "Content-Type": "application/json",
            },
        });
    
        return await response.text();
    }

    Submitted by adam186 1184 days ago

  • deno
    import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
    
    export async function main(
        gsheets_auth: wmill.Resource<"gsheets">,
        spreadsheetId: string,
        worksheet_name: string
    ) {
        const token = gsheets_auth["token"];
    
        const GET_VALUES_URL =
            `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}/values/${worksheet_name}`;
    
        const response = await fetch(GET_VALUES_URL, {
            method: "GET",
            headers: {
                Authorization: "Bearer " + token,
                "Content-Type": "application/json",
            },
        });
    
        return await response.text();
    }

    Submitted by rossmccrann 1400 days ago