Comments (15)
It is a plugin that pulls out articles from the Omnivore archive that you have read on a given day and writes them into your Obsidian journal. I wrote it based on this plugin. If anyone is interested, I would be happy to share it.
from omnivore.
Hi, you'll need to provide some more details so we can diagnose this. Search API definitely works on mobile you can open https://omnivore.app on mobile to verify. Do you have some sample code we could look at?
from omnivore.
I apologize for not providing enough information. Here is the code
async function fetchTraces(authToken) {
let mappedResults = [];
try {
const cursor = 0;
const limit = 10;
const data = JSON.stringify({
variables: {
after: "0",
first: 30,
format: "",
includeContent: false,
query: "sort:updated-desc"
},
query: `query Search(
$after: String
$first: Int
$query: String
$includeContent: Boolean
$format: String
) {
search(
first: $first,
after: $after,
query: $query,
includeContent: $includeContent,
format: $format
) {
... on SearchSuccess {
edges {
node {
id
title
slug
siteName
originalArticleUrl
url
author
updatedAt
description
savedAt
pageType
content
publishedAt
readAt
wordsCount
isArchived
readingProgressPercent
archivedAt
contentReader
}
}
pageInfo {
hasNextPage
endCursor
totalCount
}
}
... on SearchError {
errorCodes
}
}
}
`,
});
const url = `https://api-prod.omnivore.app/api/graphql`;
const completedTraceMetadata = await fetch(url, {
method: 'POST',
headers: {
"Content-Type": "application/json",
"Authorization": "${authToken}",
"X-OmnivoreClient": "obsidian"
},
body: data
}).then(function(response) {
return response.json();
});
from omnivore.
OK, my guess is what you are hitting here is a CORs error. Can you look in the developer console and on the network tab?
from omnivore.
I can only access console information on my Mac computer. The console information on the mobile device cannot be obtained within Obsidian.
from omnivore.
Thanks, I didn't understand that you were running within Obsidian. I am still guessing this is related to CORS somehow. I wonder if on Mac Obsidian is proxying the fetch request to avoid CORs but on iOS its running through the browser.
Is this installed as a plugin?
from omnivore.
Yes, this is a obsidian plugin I wrote myself. In this plugin, I fetch data from Omnivore for processing.
I searched for some information about Obsidian CORS, and one suggestion was to switch the request api from fetch to requestUrl to handle CORS. After trying this, I found that it now throws a 500 error.
const url = `https://api-prod.omnivore.app/api/graphql`;
const RequestUrlParam = {
url: url,
method: 'POST',
headers: {
"Content-Type": "application/json",
"Authorization": "${authToken}",
"X-OmnivoreClient": "obsidian"
},
body: data
};
try {
console.log("before http request");
const response = await requestUrl(RequestUrlParam);
console.log(response);
} catch (e) {
console.log(JSON.stringify(e));
}
from omnivore.
Can you paste the full stack here? (Make sure it doesn't have your token in it)
from omnivore.
Do you means the result of console.log(e.stack)
?
from omnivore.
Do you means the result of
console.log(e.stack)
?
Yeah
from omnivore.
That's the only information available
from omnivore.
Long shot because its hard to tell from our logs, but there was a request right around that time with an invalid API key. Maybe in the code update the authToken
variable was changed?
Also, your key was visible in a previous screenshot, so you should probably delete that key on our API keys page.
from omnivore.
Indeed, it was indeed the token error that caused the problem. Now the API calls are working correctly. Thank you so much for your guidance!
from omnivore.
Awesome, please let us know more about your tool when you have it ready to demo...if you plan on sharing it. Might want to checkout our Discord also.
I'll close this one out, but let me know if there are still issues
from omnivore.
I think people would really like this actually
from omnivore.
Related Issues (20)
- After unsubscribing from a subscription on web, can't unscribe from more until page refresh HOT 2
- FR: Respect certain markdown formatting in template (e.g. callouts) HOT 5
- 正文捕获缺失部分行的问题
- PrismJS embedded code snippet not copied with web extension HOT 1
- Chrome: Twitter has stopped working HOT 1
- FR: Refresh source button (Bonus: Twitter Android workaround?)
- Bug: There was an error adding new feed: Item not found HOT 9
- inkandswitch.com is missing templates
- FR: display number of articles in each compartment (inbox, archive, etc)
- Feature Request: TTS autodetect/switch playback language based on HTML locale
- Feature Request : Unable to add lables when sharing from browser in Andriod.
- increasing limit of words/characters imported HOT 4
- FR: Request full text search to support multiple lanuage like Chinese, Japanese, etc. HOT 2
- FR: Use browser on iOS when selecting "Open" for a link HOT 3
- Copy link on iOS doesn't copy the expected link HOT 3
- No contrast on "Loading" and "Load More" buttons on the web dark mode
- Text with no brand color when user is not logged in on web
- Couple Omnivore with Teable & Reor
- Feature request: generate transcript of podcasts HOT 2
- Support for search in Japanese HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omnivore.