This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BoxFile file = new BoxFile(serviceAccountClient, source.get("id").asText().intern()); | |
OutputStream stream = new ByteArrayOutputStream(); | |
file.download(stream); | |
// Insert Epi. code | |
String metadataTemplate = "productClassification"; | |
String metadataField = "/partSku"; | |
String partSku = ""; // Replace with Epi return part SKU. | |
file.createMetadata(metadataTemplate, new Metadata().add(metadataField, partSku)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Metadata commands | |
box files metadata create 278109288966 enterprise cli | |
box files metadata update 278109288966 enterprise cli --replace -p "/settings" -v "of" | |
box files metadata update 278109288966 enterprise cli --remove -p "/settings" | |
box files metadata update 278109288966 enterprise cli -a -p "/settings" -v "off" | |
# Metadata Date Value | |
box files metadata update 278109288966 enterprise cli -a -p "/home" -v "2002-10-02T10:00:00-05:00" | |
# Metadata Enum Value | |
box files metadata update 278109288966 enterprise cli -a -p "/env" -v "admin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM microsoft/dotnet | |
RUN apt-get update | |
RUN apt-get install -y curl unzip zip | |
RUN dotnet new -i Amazon.Lambda.Templates::* | |
RUN apt-get install -y groff-base | |
RUN wget https://bootstrap.pypa.io/get-pip.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"strings" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Box.V2.Config; | |
using Box.V2.JWTAuth; | |
namespace BoxGetAllUsers | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.box; | |
import com.box.sdk.BoxConfig; | |
import com.box.sdk.BoxDeveloperEditionAPIConnection; | |
import com.box.sdk.BoxFile; | |
import com.box.sdk.BoxFolder; | |
import com.box.sdk.BoxItem; | |
import java.io.BufferedReader; | |
import java.io.FileOutputStream; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const box = require('box-node-sdk'); | |
const fs = require('fs'); | |
const util = require('util'); | |
const path = require('path'); | |
let configFile = fs.readFileSync('config.json'); | |
configFile = JSON.parse(configFile); | |
let session = box.getPreconfiguredInstance(configFile); | |
let client = session.getAppAuthClient("enterprise"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BoxFolderTreeBuilder { | |
constructor(boxClient, options) { | |
options = options || {}; | |
boxClient._useIterators = true; | |
this.boxClient = boxClient; | |
this.maxDepth = options.maxDepth || -1; | |
this.rootFolderId = options.rootFolderId || "0"; | |
} | |
async buildFolderTreeWithFlatLists() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.box; | |
import java.util.ArrayList; | |
import com.box.sdk.BoxDeveloperEditionAPIConnection; | |
import com.box.sdk.BoxFile; | |
import com.box.sdk.BoxFolder; | |
import com.box.sdk.BoxItem; | |
import com.eclipsesource.json.JsonArray; | |
import com.eclipsesource.json.JsonObject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BoxFolderTreeBuilder | |
{ | |
public BoxClient BoxClient { get; set; } | |
public string RootFolderId { get; set; } | |
public int MaxDepth { get; set; } | |
public BoxFolderTreeBuilder(BoxClient boxClient, string rootFolderId = "0", int maxDepth = -1) | |
{ | |
this.BoxClient = boxClient; | |
this.RootFolderId = rootFolderId; |