KiCad PCB EDA Suite
Loading...
Searching...
No Matches
http_lib_connection.h File Reference
#include <any>
#include <boost/algorithm/string.hpp>
#include <json_common.h>
#include "http_lib/http_lib_settings.h"
#include <kicad_curl/kicad_curl_easy.h>

Go to the source code of this file.

Classes

class  HTTP_LIB_CONNECTION
 

Functions

bool setPartExtendedData (const nlohmann::json &aPartJson, HTTP_LIB_PART &aPart)
 Parse the exclusion flags and field content from a part's JSON record into aPart.
 

Variables

const char *const traceHTTPLib
 

Function Documentation

◆ setPartExtendedData()

bool setPartExtendedData ( const nlohmann::json & aPartJson,
HTTP_LIB_PART & aPart )

Parse the exclusion flags and field content from a part's JSON record into aPart.

The category listing and per-part detail endpoints share this shape but the listing may omit the fields; parsing is tolerant of missing keys and of flags encoded as either JSON strings or native booleans.

Returns
true if the record carried a fields object (the part's full detail is present).

Definition at line 236 of file http_lib_connection.cpp.

References HTTP_LIB_PART::exclude_from_board, HTTP_LIB_PART::exclude_from_bom, HTTP_LIB_PART::exclude_from_sim, HTTP_LIB_PART::fields, jsonBoolField(), and HTTP_LIB_PART::symbolIdStr.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), HTTP_LIB_CONNECTION::SelectAll(), and HTTP_LIB_CONNECTION::SelectOne().

Variable Documentation

◆ traceHTTPLib