MCPcopy Create free account
hub / github.com/chokcoco/iCSS / fetchFileContent

Method fetchFileContent

MCP/scripts/fetch-inspiration.js:146–160  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

144 }
145
146 async fetchFileContent(filePath) {
147 try {
148 const response = await axios.get(`${this.rawURL}/${filePath}`, {
149 headers: {
150 'User-Agent': 'iCSS-MCP-Server',
151 ...(this.githubToken && { 'Authorization': `token ${this.githubToken}` })
152 }
153 });
154
155 return response.data;
156 } catch (error) {
157 console.error(`❌ Error fetching file ${filePath}:`, error.message);
158 return null;
159 }
160 }
161
162 parseMarkdownContent(content, category, filename) {
163 const lines = content.split('\n');

Callers 1

fetchAllInspirationsMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected