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.
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.