GithubHelp home page GithubHelp logo

neapolis's Introduction

neapolis

[Build Status] (https://travis-ci.org/matthin/neapolis)

A C++ wrapper for the Neocities API.

Requirements

  • libcurl (sudo apt-get install libcurl4-openssl-dev)
  • C++11 compatible compiler
  • CMake v2.8.7+
  • Git v1.6.5+

Usage

Assuming you're using CMake, and want neapolis to be at 'opt/neapolis'.

Installation

$ git clone --recursive https://github.com/matthin/neapolis.git opt/neapolis

CMakeLists.txt

add_subdirectory(opt/neapolis)
include_directories(opt/neapolis/include)
target_link_libraries(YOUR_EXECUTABLE neapolis)

Example

nea::Client client("user", "pass");
std::cout << client.upload({
  {"test.html", "path/to/test.html"}
}).successful() << std::endl;
std::cout << client.info("some_user").successful() << std::endl;
std::cout << client.remove("test.html").successful() << std::endl;

Contributors

Setup

$ git clone --recursive https://github.com/matthin/neapolis.git
$ cd neapolis
$ mkdir build && cd build
$ cmake -DUSE_SYSTEM_CURL=ON ..
$ make
State of Unit Testing

I can't fully wrap my head around mocking objects in C++. I come from a Ruby background where everything can be easily modified at runtime, which is a huge difference compared to C++.

I've looked into Google Mock and a few different mocking frameworks, but I don't like the idea of leaking testing implementation details into the real objects, such as needing to declare every mocked method as virtual. I'm probably forced into doing so, but I first want to to spend quite a while researching the most modern mocking pattern.

If anyone else wants to take a shot at mocking the Client object to not hit the remote API, I'll gladly welcome it.

neapolis's People

Contributors

potatodiet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.