MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / ListChannels

Method ListChannels

Src/Common/FSecure/Dropbox/DropboxApi.cpp:88–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88std::map<std::string, std::string> FSecure::Dropbox::ListChannels()
89{
90 std::map<std::string, std::string> channelMap;
91 std::string url = OBF("https://api.dropboxapi.com/2/files/list_folder");
92 json j;
93 j[OBF("path")] = OBF(""); // Read from the root of the directory
94
95 json response = SendJsonRequest(url, j);
96
97 for (auto& channel : response[OBF("entries")])
98 {
99 std::string item_type = channel[OBF(".tag")];
100 if (item_type == OBF("folder"))
101 channelMap.emplace(channel[OBF("name")], channel[OBF("id")]);
102 }
103
104 return channelMap;
105}
106
107std::string FSecure::Dropbox::CreateChannel(std::string const& channelName)
108{

Callers 1

CreateChannelMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected