samhuri.net-ios/Blog/BlogService.h
Sami Samhuri bd704e4241 implement basic editing, preview, and improve article list
- new dark look that matches samhuri.net
- improved cell layout for article list
- fix yap caching
- update service layer to match new API
- implement authentication
- fix bugs all over
- add a preview
2015-04-19 19:15:55 -07:00

39 lines
1.2 KiB
Objective-C

//
// BlogService.h
// Blog
//
// Created by Sami Samhuri on 2014-11-23.
// Copyright (c) 2014 Guru Logic Inc. All rights reserved.
//
@import Foundation;
#import <PromiseKit/PromiseKit.h>
extern NSString * const BlogServiceErrorDomain;
typedef NS_ENUM(NSUInteger, BlogServiceErrorCode) {
BlogServiceErrorCodeWTF
};
@class JSONHTTPClient;
@interface BlogService : NSObject
- (instancetype)initWithRootURL:(NSString *)rootURL client:(JSONHTTPClient *)client;
- (NSURL *)urlFor:(NSString *)path, ...;
- (PMKPromise *)requestBlogStatus;
- (PMKPromise *)requestPublishEnvironment:(NSString *)environment;
- (PMKPromise *)requestDrafts;
- (PMKPromise *)requestPublishedPosts;
- (PMKPromise *)requestPostWithPath:(NSString *)path;
- (PMKPromise *)requestCreateDraftWithID:(NSString *)draftID title:(NSString *)title body:(NSString *)body link:(NSString *)link;
- (PMKPromise *)requestUpdatePostWithPath:(NSString *)path title:(NSString *)title body:(NSString *)body link:(NSString *)link;
- (PMKPromise *)requestPublishDraftWithPath:(NSString *)path;
- (PMKPromise *)requestUnpublishPostWithPath:(NSString *)path;
- (PMKPromise *)requestDeletePostWithPath:(NSString *)path;
@end