Actually, sorry, I was totally wrong in my earlier comment. You very likely just want to use the LessWrong graphql endpoints that the LW frontend uses, which ensure that everything gets properly logged and routed through the LW DB. The basic setup for those is pretty simple (and you can probably figure it out pretty straightforwardly by inspecting the network tab). Here are the 2 graphql endpoints and the associated schemas:
ElicitBlockData(questionId: String): ElicitBlockData // For querying
MakeElicitPrediction(questionId: String, prediction: Int): ElicitBlockData // For predicting
type ElicitBlockData {
_id: String
title: String
notes: String
resolvesBy: Date
resolution: Boolean
predictions: [ElicitPrediction]
}
type ElicitPrediction {
_id: String
predictionId: String
prediction: Float
createdAt: Date
notes: String
creator: ElicitUser
sourceUrl: String
sourceId: String
binaryQuestionId: String
}
type ElicitUser {
isQuestionCreator: Boolean
displayName: String
_id: String
sourceUserId: String
lwUser: User
}
The only slightly non-obvious thing in the API is that you can cancel your predictions by passing in null or 0 for the prediction value.
Re elicit: Ought sent us an API documentation that should allow GW to build their own widget (if you do so, looking forward to your implementation! I have in the past found a lot of value in seeing how GW tackles similar design challenges). I won’t paste a link here, since I am not fully confident it’s public, but Amanda or anyone else from Ought can paste the public version.
Re Metaculus: Yes, in that case it’s just a nice iframe that you should be easily able to reverse engineer. You just render an iframe with this URL: https://d3s0w6fek99l5b.cloudfront.net/s/1/questions/embed/<question number>/?plot=pdf and I think everything should work (with the question number being the obvious number extracted from the normal metaculus question URL). My guess is actually if you just render the HTML you get from LessWrong, everything should work out of the box, though of course it might require some additional styling and modification to work with GW, but the basic skeleton should work.
Cool feature!
Is there any info on implementing Elicit embeds on other sites? (Like, say, GreaterWrong? :) I looked on elicit.org and didn’t find anything.
EDIT: Same question re: Metaculus embeds…
Actually, sorry, I was totally wrong in my earlier comment. You very likely just want to use the LessWrong graphql endpoints that the LW frontend uses, which ensure that everything gets properly logged and routed through the LW DB. The basic setup for those is pretty simple (and you can probably figure it out pretty straightforwardly by inspecting the network tab). Here are the 2 graphql endpoints and the associated schemas:
The only slightly non-obvious thing in the API is that you can cancel your predictions by passing in null or 0 for the prediction value.
Here is an example query:
Is it possible to insert a question using the markdown editor, or does it require using the new editor?
Currently requires the WYSIWYG editor. Sorry about that.
Re elicit: Ought sent us an API documentation that should allow GW to build their own widget (if you do so, looking forward to your implementation! I have in the past found a lot of value in seeing how GW tackles similar design challenges). I won’t paste a link here, since I am not fully confident it’s public, but Amanda or anyone else from Ought can paste the public version.
Re Metaculus: Yes, in that case it’s just a nice iframe that you should be easily able to reverse engineer. You just render an iframe with this URL:
https://d3s0w6fek99l5b.cloudfront.net/s/1/questions/embed/<question number>/?plot=pdf
and I think everything should work (with the question number being the obvious number extracted from the normal metaculus question URL). My guess is actually if you just render the HTML you get from LessWrong, everything should work out of the box, though of course it might require some additional styling and modification to work with GW, but the basic skeleton should work.