Permalink
Browse files

Updated CouchClient to return CouchResponse as well.

  • Loading branch information...
1 parent 44c2334 commit d87fda3f95c6c2e6947363553a6185f32cc88a11 @soitgoes committed Jan 18, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 LoveSeat/CouchClient.cs
View
@@ -76,7 +76,7 @@ public CouchClient(CouchConfiguration config)
/// <param name="target">Uri or database name of database to replicate to</param>
/// <param name="continuous">Whether or not CouchDB should continue to replicate going forward on it's own</param>
/// <returns></returns>
- public JObject TriggerReplication(string source, string target, bool continuous)
+ public CouchResponse TriggerReplication(string source, string target, bool continuous)
{
var request = GetRequest(baseUri + "_replicate");
@@ -88,7 +88,7 @@ public JObject TriggerReplication(string source, string target, bool continuous)
return response.GetJObject();
}
- public JObject TriggerReplication(string source, string target)
+ public CouchResponse TriggerReplication(string source, string target)
{
return TriggerReplication(source, target, false);
}
@@ -98,7 +98,7 @@ public JObject TriggerReplication(string source, string target)
/// </summary>
/// <param name="databaseName">Name of new database</param>
/// <returns></returns>
- public JObject CreateDatabase(string databaseName)
+ public CouchResponse CreateDatabase(string databaseName)
{
return GetRequest(baseUri + databaseName).Put().GetResponse().GetJObject();
}
@@ -107,7 +107,7 @@ public JObject CreateDatabase(string databaseName)
/// </summary>
/// <param name="databaseName">Database to delete</param>
/// <returns></returns>
- public JObject DeleteDatabase(string databaseName)
+ public CouchResponse DeleteDatabase(string databaseName)
{
return GetRequest(baseUri + databaseName).Delete().GetResponse().GetJObject();
}
@@ -128,7 +128,7 @@ public CouchDatabase GetDatabase(string databaseName)
/// <param name="usernameToCreate"></param>
/// <param name="passwordToCreate"></param>
/// <returns></returns>
- public JObject CreateAdminUser(string usernameToCreate, string passwordToCreate)
+ public CouchResponse CreateAdminUser(string usernameToCreate, string passwordToCreate)
{
//Creates the user in the local.ini
var iniResult = GetRequest(baseUri + "_config/admins/" + HttpUtility.UrlEncode(usernameToCreate))
@@ -211,7 +211,7 @@ public Document GetUser(string userId)
/// <param name="usernameToCreate"></param>
/// <param name="passwordToCreate"></param>
/// <returns></returns>
- public JObject CreateUser(string usernameToCreate, string passwordToCreate)
+ public CouchResponse CreateUser(string usernameToCreate, string passwordToCreate)
{
var user = "";

0 comments on commit d87fda3

Please sign in to comment.