/// <summary> /// This lets you or one of your users score an image 1-10. /// </summary> /// <param name="request">A <see cref="VoteRequestBuilder"> object containing request parameters.</see></param> /// <exception cref="InvalidRequestException">Thrown if any required parameters are null.</exception> /// <returns></returns> public IEnumerable <VoteResponse.Vote> Vote(VoteRequestBuilder request) { var uri = request.Build(); var response = Get <VoteResponse.Response>(uri); return(response.Data.Votes); }
public void VoteRequest_WhenARequiredParamIsNull_Then_ExceptionIsThrown() { var actual = new VoteRequestBuilder(DummyApiKey, null, 4) .WithSubId(DummySubId); AssertThrows <InvalidRequestException>(() => actual.Build()); }