samhuri.net-ios/Blog/BlogController.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

43 lines
1.4 KiB
Objective-C

//
// BlogController.h
// Blog
//
// Created by Sami Samhuri on 2014-11-27.
// Copyright (c) 2014 Guru Logic Inc. All rights reserved.
//
@import Foundation;
extern NSString *BlogStatusChangedNotification;
extern NSString *BlogDraftsChangedNotification;
extern NSString *BlogDraftAddedNotification;
extern NSString *BlogDraftRemovedNotification;
extern NSString *BlogPublishedPostsChangedNotification;
extern NSString *BlogPublishedPostAddedNotification;
extern NSString *BlogPublishedPostRemovedNotification;
extern NSString *BlogPostChangedNotification;
extern NSString *BlogPostDeletedNotification;
@class PMKPromise;
@class ModelStore;
@class BlogService;
@interface BlogController : NSObject
- (instancetype)initWithService:(BlogService *)service store:(ModelStore *)store;
- (NSMutableURLRequest *)previewRequestWithPath:(NSString *)path;
- (PMKPromise *)requestBlogStatus;
- (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