Showing
2 changed files
with
15 additions
and
2 deletions
| ... | @@ -22,6 +22,21 @@ int main(int argc, char *argv[]) { | ... | @@ -22,6 +22,21 @@ int main(int argc, char *argv[]) { |
| 22 | rapidjson::Document d; | 22 | rapidjson::Document d; |
| 23 | d.Parse(_curl_processor.get_buffer().c_str()); | 23 | d.Parse(_curl_processor.get_buffer().c_str()); |
| 24 | 24 | ||
| 25 | + rapidjson::Value& value_status = d["status"]; | ||
| 26 | + std::string status_str = value_status.GetString(); | ||
| 27 | + printf("status: %s\n", status_str.c_str()); | ||
| 28 | + | ||
| 29 | + //if (status_str != "ok") { | ||
| 30 | + // printf("status: %s\n", status_str.c_str()); | ||
| 31 | + // printf("not ok\n"); | ||
| 32 | + // return 1; | ||
| 33 | + //} | ||
| 34 | + | ||
| 35 | + rapidjson::Value& value_message = d["message"]; | ||
| 36 | + rapidjson::Value& citation_count = value_message["is-referenced-by-count"]; | ||
| 37 | + int cit_cnt = citation_count.GetInt(); | ||
| 38 | + printf("citation: %d\n", cit_cnt); | ||
| 39 | + | ||
| 25 | return 0; | 40 | return 0; |
| 26 | } | 41 | } |
| 27 | 42 | ... | ... |
| ... | @@ -52,8 +52,6 @@ | ... | @@ -52,8 +52,6 @@ |
| 52 | #include <bibtexreader.hpp> | 52 | #include <bibtexreader.hpp> |
| 53 | 53 | ||
| 54 | #include <rapidjson/document.h> | 54 | #include <rapidjson/document.h> |
| 55 | -#include <rapidjson/writer.h> | ||
| 56 | -#include <rapidjson/stringbuffer.h> | ||
| 57 | 55 | ||
| 58 | #include "bibtex_processor.h" | 56 | #include "bibtex_processor.h" |
| 59 | #include "curl_processor.h" | 57 | #include "curl_processor.h" | ... | ... |
-
Please register or login to post a comment