Plugin Directory

Changeset 2920184


Ignore:
Timestamp:
06/01/2023 02:54:31 PM (3 years ago)
Author:
appfulapp
Message:

Fixed content sync

Location:
appful-app
Files:
12 added
57 edited
42 copied

Legend:

Unmodified
Added
Removed
  • appful-app/tags/3.1.0/appful-app.php

    r2920030 r2920184  
    1212 * Plugin URI:        https://appful.io
    1313 * Description:       Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes.
    14  * Version:           3.0.0
     14 * Version:           3.1.0
    1515 * Requires at least: 5.8
    1616 * Requires PHP:      7.4
  • appful-app/tags/3.1.0/includes/api/Endpoints.php

    r2920030 r2920184  
    2222    public static string $GET_POSTS = "get-post";
    2323    public static string $GET_POST_CONTENTS = "get-post-content";
     24    public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local";
    2425    public static string $GET_USERS = "get-user";
    2526    public static string $GET_TAGS = "get-tag";
     
    2930
    3031
    31     public static string $HOOK = "/appful/api/";
     32    public static string $HOOK = "/appful/api";
    3233    public static string $CREATE_COMMENT = "create-comment";
    3334    public static string $AUTHENTICATE_USER = "authenticate-user";
  • appful-app/tags/3.1.0/includes/api/ReqHandler.php

    r2920030 r2920184  
    2020use AppfulPlugin\Api\Handlers\LogRequestHandler;
    2121use AppfulPlugin\Api\Handlers\PostSyncRequestHandler;
     22use AppfulPlugin\Api\Handlers\PullLocalPostContentRequestHandler;
    2223use AppfulPlugin\Api\Handlers\RequestHandler;
    2324use AppfulPlugin\Api\Handlers\SyncRequestHandler;
     
    5455            new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ),
    5556            new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ),
     57            new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ),
    5658        ];
    5759    }
  • appful-app/tags/3.1.0/includes/api/client/BackendClient.php

    r2907312 r2920184  
    33namespace AppfulPlugin\Api\Client;
    44
    5 use AppfulPlugin\Api\Requests\BackendRequest;
    6 use AppfulPlugin\Api\Responses\BackendResponse;
     5use AppfulPlugin\Api\Requests\HttpRequest;
     6use AppfulPlugin\Api\Responses\HttpResponse;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    2525    }
    2626
    27     public function send_request( BackendRequest $backend_request ): BackendResponse {
     27    public function send_request( HttpRequest $backend_request ): HttpResponse {
    2828        try {
    2929            if ( ! $backend_request->has_header( "Authorization" ) ) {
     
    4242            }
    4343
    44             return BackendResponse::backend_response()->body( json_decode( $response->getBody(), true ) )->status( $response->getStatusCode() );
     44            return HttpResponse::backend_response()->body( json_decode( $response->getBody(), true ) )->status( $response->getStatusCode() );
    4545        } catch ( GuzzleException $e ) {
    4646            Logger::log( "Error happened when trying to execute backend request: " . $e->getMessage() );
    4747
    48             return BackendResponse::backend_response()->status( 500 );
     48            return HttpResponse::backend_response()->status( 500 );
    4949        }
    5050    }
  • appful-app/tags/3.1.0/includes/helper/Constants.php

    r2920030 r2920184  
    3535    public static string $API_VERSION_1 = "/v1";
    3636
    37     public static int $POST_SYNC_CHUNK_SIZE = 200;
     37    public static int $POST_SYNC_CHUNK_SIZE = 70;
    3838    public static int $COMMENT_SYNC_CHUNK_SIZE = 100;
    3939    public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 200;
  • appful-app/tags/3.1.0/includes/main/AppfulPlugin.php

    r2920030 r2920184  
    55use AppfulPlugin\Api\Api;
    66use AppfulPlugin\Api\Client\BackendClient;
     7use AppfulPlugin\Api\Client\SelfClient;
    78use AppfulPlugin\Api\ReqHandler;
    89use AppfulPlugin\Api\Rewrites;
     
    2728        $rewrites               = new Rewrites();
    2829        $backend_client         = new BackendClient();
    29         $this->use_case_manager = new UseCaseManager( $backend_client );
     30        $self_client            = new SelfClient();
     31        $this->use_case_manager = new UseCaseManager( $backend_client, $self_client );
    3032        $api_request_handler    = new ReqHandler( $this->use_case_manager );
    3133
  • appful-app/tags/3.1.0/includes/use_cases/AttachmentDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $attachment_id ) {
    1818        Logger::log( "Sending attachment delete request for: " . $attachment_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$ATTACHMENT_PATH . "/" . $attachment_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$ATTACHMENT_PATH . "/" . $attachment_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/AttachmentSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\AttachmentMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Attachment;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $attachment_dto = AttachmentMapper::to_dto( $attachment );
    2121        Logger::log( "Sending attachment save request with data: " . json_encode( $attachment_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $attachment_dto )->path( Constants::$ATTACHMENT_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $attachment_dto )->path( Constants::$ATTACHMENT_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/use_cases/CategoryDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $term_id ) {
    1818        Logger::log( "Sending category delete request for: " . $term_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/categories/" . $term_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/categories/" . $term_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/CategorySaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\CategoryMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Category;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $category_dto = CategoryMapper::to_dto( $category );
    2121        Logger::log( "Sending category save request with data: " . json_encode( $category_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $category_dto )->path( Constants::$TAXONOMY_PATH . "/categories" );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $category_dto )->path( Constants::$TAXONOMY_PATH . "/categories" );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/use_cases/CommentDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $comment_id ) {
    1818        Logger::log( "Sending comment delete request for: " . $comment_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$COMMENT_PATH . "/" . $comment_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$COMMENT_PATH . "/" . $comment_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/CommentSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\CommentMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Comment;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $comment_dto = CommentMapper::to_dto( $comment );
    2121        Logger::log( "Sending comment save request with data: " . json_encode( $comment_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $comment_dto )->path( Constants::$COMMENT_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $comment_dto )->path( Constants::$COMMENT_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/use_cases/DeleteSessionUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1818    public function invoke() {
    1919        Logger::log("Unregistering blog!");
    20         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$BLOG_PATH );
     20        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$BLOG_PATH );
    2121        $this->backend_client->send_request( $request );
    2222    }
  • appful-app/tags/3.1.0/includes/use_cases/GetPostContentsByIdUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Domain\PostContent;
    6 use AppfulPlugin\Wp\WPPostManager;
    76
    87class GetPostContentsByIdUseCase {
     8    private PullLocalPostContentUseCase $pull_local_post_content_use_case;
     9
     10    public function __construct( PullLocalPostContentUseCase $pull_local_post_content_use_case ) {
     11        $this->pull_local_post_content_use_case = $pull_local_post_content_use_case;
     12    }
     13
     14
    915    /**
    1016     * @param int[] $ids
     
    1319     */
    1420    public function invoke( array $ids ): array {
    15         return WPPostManager::get_post_contents_by_id( $ids );
     21        $post_contents = [];
     22
     23        foreach ( $ids as $post_id ) {
     24            $response = $this->pull_local_post_content_use_case->invoke( $post_id );
     25            if ( $response != null ) {
     26                $post_contents[] = $response;
     27            }
     28        }
     29
     30        return $post_contents;
    1631    }
    1732}
  • appful-app/tags/3.1.0/includes/use_cases/LogoutUserUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke() {
    1818        Logger::log( "Logout user!" );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$APPFUL_USER_PATH . "/logout" );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$APPFUL_USER_PATH . "/logout" );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/PostDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $post_id ) {
    1818        Logger::log( "Sending post delete request for: " . $post_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$POST_PATH . "/" . $post_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$POST_PATH . "/" . $post_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/PostSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\PostMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Post;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $post_dto = PostMapper::to_dto( $post );
    2121        Logger::log( "Sending post save request with data: " . json_encode( $post_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $post_dto )->path( Constants::$POST_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $post_dto )->path( Constants::$POST_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/use_cases/RegisterBlogUseCase.php

    r2920030 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\BlogInfoMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Helper\Constants;
    99use AppfulPlugin\Helper\Logger;
     
    2222        $blog_info_dto = BlogInfoMapper::to_dto( $blog_info );
    2323        Logger::log( "Registering blog with data: " . json_encode( $blog_info_dto ) );
    24         $request = BackendRequest::backend_request()->method( "POST" )->body( $blog_info_dto )->path( Constants::$BLOG_PATH );
     24        $request = HttpRequest::backend_request()->method( "POST" )->body( $blog_info_dto )->path( Constants::$BLOG_PATH );
    2525        $body    = $this->backend_client->send_request( $request )->get_body();
    2626        if ( $body != null && isset( $body['blog_id'] ) ) {
  • appful-app/tags/3.1.0/includes/use_cases/SendAttachmentChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending attachment chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$ATTACHMENT_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$ATTACHMENT_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/tags/3.1.0/includes/use_cases/SendCategoryChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending category chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/categories/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/categories/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/tags/3.1.0/includes/use_cases/SendCommentChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending comment chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$COMMENT_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$COMMENT_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/tags/3.1.0/includes/use_cases/SendPostChunkSyncUseCase.php

    r2907312 r2920184  
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    77use AppfulPlugin\Api\Mapper\SyncItemMapper;
    8 use AppfulPlugin\Api\Requests\BackendRequest;
     8use AppfulPlugin\Api\Requests\HttpRequest;
    99use AppfulPlugin\Domain\SyncChunk;
    1010use AppfulPlugin\Domain\SyncItem;
     
    2323
    2424        Logger::log( "Sending post chunk to sync: " . json_encode( $sync_item_dtos ) );
    25         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$POST_PATH . "/sync" );
     25        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$POST_PATH . "/sync" );
    2626        $this->backend_client->send_request( $request );
    2727    }
  • appful-app/tags/3.1.0/includes/use_cases/SendTagChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending tag chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/tags/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/tags/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/tags/3.1.0/includes/use_cases/SendUserChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending user chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$USER_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$USER_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/tags/3.1.0/includes/use_cases/TagDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $term_id ) {
    1818        Logger::log( "Sending tag delete request for: " . $term_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/tags/" . $term_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/tags/" . $term_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/TagSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\TagMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Tag;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $tag_dto = TagMapper::to_dto( $tag );
    2121        Logger::log( "Sending tag save request with data: " . json_encode( $tag_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $tag_dto )->path( Constants::$TAXONOMY_PATH . "/tags" );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $tag_dto )->path( Constants::$TAXONOMY_PATH . "/tags" );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/use_cases/UseCaseManager.php

    r2920030 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
     6use AppfulPlugin\Api\Client\SelfClient;
    67
    78class UseCaseManager {
     
    5455    private ClearLogsUseCase $clear_logs_use_case;
    5556    private AuthenticateUserUseCase $authenticate_user_use_case;
    56 
    57     public function __construct( BackendClient $backend_client ) {
     57    private PullLocalPostContentUseCase $pull_local_post_content_use_case;
     58    private GetLocalPostContentByIdUseCase $get_local_post_content_by_id_use_case;
     59
     60    public function __construct( BackendClient $backend_client, SelfClient $self_client ) {
    5861        $this->get_android_asset_link_use_case         = new GetAndroidAssetLinkUseCase();
    5962        $this->get_apple_app_site_association_use_case = new GetAppleAppSiteAssociationUseCase();
     
    101104        $this->user_delete_use_case                    = new UserDeleteUseCase( $backend_client );
    102105        $this->user_save_use_case                      = new UserSaveUseCase( $backend_client );
    103         $this->get_post_contents_by_id_use_case        = new GetPostContentsByIdUseCase();
    104106        $this->clear_logs_use_case                     = new ClearLogsUseCase();
    105107        $this->authenticate_user_use_case              = new AuthenticateUserUseCase();
     108        $this->pull_local_post_content_use_case        = new PullLocalPostContentUseCase( $self_client );
     109        $this->get_local_post_content_by_id_use_case   = new GetLocalPostContentByIdUseCase();
     110        $this->get_post_contents_by_id_use_case        = new GetPostContentsByIdUseCase( $this->pull_local_post_content_use_case );
    106111    }
    107112
     
    297302        return $this->authenticate_user_use_case;
    298303    }
     304
     305    public function get_pull_local_post_content_use_case(): PullLocalPostContentUseCase {
     306        return $this->pull_local_post_content_use_case;
     307    }
     308
     309    public function get_get_local_post_content_by_id_use_case(): GetLocalPostContentByIdUseCase {
     310        return $this->get_local_post_content_by_id_use_case;
     311    }
    299312}
  • appful-app/tags/3.1.0/includes/use_cases/UserDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $user_id ) {
    1818        Logger::log( "Sending user delete request for: " . $user_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$USER_PATH . "/" . $user_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$USER_PATH . "/" . $user_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/tags/3.1.0/includes/use_cases/UserSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\UserMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\User;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $user_dto = UserMapper::to_dto( $user );
    2121        Logger::log( "Sending user save request with data: " . json_encode( $user_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $user_dto )->path( Constants::$USER_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $user_dto )->path( Constants::$USER_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/tags/3.1.0/includes/wp/WPBlogManager.php

    r2920030 r2920184  
    2121    private static function get_hooks(): BlogHooks {
    2222        return BlogHooks::blog_hooks()
    23                         ->create_comment( self::get_site_url() . Endpoints::$HOOK . Endpoints::$CREATE_COMMENT )
    24                         ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . Endpoints::$AUTHENTICATE_USER );
     23                        ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT )
     24                        ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER );
    2525    }
    2626
  • appful-app/tags/3.1.0/includes/wp/WPPostManager.php

    r2907312 r2920184  
    8686    }
    8787
    88     /**
    89      * @param int[] $ids
    90      *
    91      * @return PostContent[]
    92      */
    93     public static function get_post_contents_by_id( array $ids ): array {
    94         return self::pullPostByIds( $ids );
    95     }
    96 
    97     /**
    98      * @param int[] $ids
    99      *
    100      * @return PostContent[]
    101      */
    102     private static function pullPostByIds( array $ids ): array {
     88    public static function get_post_content_by_id( int $id ): ?PostContent {
    10389        global $wp_query;
    104 
    105         $postContents = [];
    10690
    10791        do_action( 'template_redirect' );
    10892
    109         foreach ( $ids as $post_id ) {
    110             $args = [
    111                 "posts_per_page" => 1,
    112                 "post_type"      => "post",
    113                 "p"              => $post_id,
    114                 "post_status"    => self::get_allowed_post_stati()
    115             ];
     93        $args = [
     94            "posts_per_page" => 1,
     95            "post_type"      => "post",
     96            "p"              => $id,
     97            "post_status"    => self::get_allowed_post_stati()
     98        ];
    11699
    117             $wp_query = new \WP_Query( $args );
    118             while ( have_posts() ) {
    119                 the_post();
     100        $wp_query = new \WP_Query( $args );
     101        if ( have_posts() ) {
     102            the_post();
    120103
    121                 ob_start();
    122                 wp_head();
    123                 $head = ob_get_clean();
     104            ob_start();
     105            wp_head();
     106            $head = ob_get_clean();
    124107
    125                 ob_start();
    126                 the_content();
    127                 $content = ob_get_clean();
     108            ob_start();
     109            the_content();
     110            $content = ob_get_clean();
    128111
    129                 ob_start();
    130                 wp_footer();
    131                 $footer = ob_get_clean();
     112            ob_start();
     113            wp_footer();
     114            $footer = ob_get_clean();
    132115
    133                 ob_start();
    134                 body_class();
    135                 $body_class = ob_get_clean();
    136 
    137                 $postContents[] = PostContent::postContent()
    138                                              ->id( get_the_ID() )
    139                                              ->content( $content )
    140                                              ->head( $head )
    141                                              ->footer( $footer )
    142                                              ->body_class( $body_class );
    143             }
     116            ob_start();
     117            body_class();
     118            $body_class = ob_get_clean();
    144119
    145120            wp_reset_postdata();
     121
     122            return PostContent::postContent()
     123                              ->id( get_the_ID() )
     124                              ->content( $content )
     125                              ->head( $head )
     126                              ->footer( $footer )
     127                              ->body_class( $body_class );
    146128        }
    147129
    148         return $postContents;
     130        return null;
    149131    }
    150132
  • appful-app/tags/3.1.0/lib/vendor/composer/autoload_classmap.php

    r2920030 r2920184  
    99    'AppfulPlugin\\Api\\Api' => $baseDir . '/../includes/api/Api.php',
    1010    'AppfulPlugin\\Api\\Client\\BackendClient' => $baseDir . '/../includes/api/client/BackendClient.php',
     11    'AppfulPlugin\\Api\\Client\\SelfClient' => $baseDir . '/../includes/api/client/SelfClient.php',
    1112    'AppfulPlugin\\Api\\Dtos\\AttachmentDto' => $baseDir . '/../includes/api/dtos/AttachmentDto.php',
    1213    'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => $baseDir . '/../includes/api/dtos/BlogHooksDto.php',
     
    3940    'AppfulPlugin\\Api\\Handlers\\LogRequestHandler' => $baseDir . '/../includes/api/handlers/LogRequestHandler.php',
    4041    'AppfulPlugin\\Api\\Handlers\\PostSyncRequestHandler' => $baseDir . '/../includes/api/handlers/PostSyncRequestHandler.php',
     42    'AppfulPlugin\\Api\\Handlers\\PullLocalPostContentRequestHandler' => $baseDir . '/../includes/api/handlers/PullLocalPostContentRequestHandler.php',
    4143    'AppfulPlugin\\Api\\Handlers\\RequestHandler' => $baseDir . '/../includes/api/handlers/RequestHandler.php',
    4244    'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => $baseDir . '/../includes/api/handlers/SyncRequestHandler.php',
     
    5557    'AppfulPlugin\\Api\\Mapper\\UserMapper' => $baseDir . '/../includes/api/mapper/UserMapper.php',
    5658    'AppfulPlugin\\Api\\ReqHandler' => $baseDir . '/../includes/api/ReqHandler.php',
    57     'AppfulPlugin\\Api\\Requests\\BackendRequest' => $baseDir . '/../includes/api/requests/BackendRequest.php',
     59    'AppfulPlugin\\Api\\Requests\\HttpRequest' => $baseDir . '/../includes/api/requests/HttpRequest.php',
    5860    'AppfulPlugin\\Api\\Requests\\PluginRequest' => $baseDir . '/../includes/api/requests/PluginRequest.php',
    59     'AppfulPlugin\\Api\\Responses\\BackendResponse' => $baseDir . '/../includes/api/reponses/BackendResponse.php',
     61    'AppfulPlugin\\Api\\Responses\\HttpResponse' => $baseDir . '/../includes/api/reponses/HttpResponse.php',
    6062    'AppfulPlugin\\Api\\Responses\\PluginResponse' => $baseDir . '/../includes/api/reponses/PluginResponse.php',
    6163    'AppfulPlugin\\Api\\Rewrites' => $baseDir . '/../includes/api/Rewrites.php',
     
    111113    'AppfulPlugin\\UseCases\\GetCommentSyncDataUseCase' => $baseDir . '/../includes/use_cases/GetCommentSyncDataUseCase.php',
    112114    'AppfulPlugin\\UseCases\\GetCommentsByIdUseCase' => $baseDir . '/../includes/use_cases/GetCommentsByIdUseCase.php',
     115    'AppfulPlugin\\UseCases\\GetLocalPostContentByIdUseCase' => $baseDir . '/../includes/use_cases/GetLocalPostContentByIdUseCase.php',
    113116    'AppfulPlugin\\UseCases\\GetLogsUseCase' => $baseDir . '/../includes/use_cases/GetLogsUseCase.php',
    114117    'AppfulPlugin\\UseCases\\GetPostContentsByIdUseCase' => $baseDir . '/../includes/use_cases/GetPostContentsByIdUseCase.php',
     
    123126    'AppfulPlugin\\UseCases\\PostDeleteUseCase' => $baseDir . '/../includes/use_cases/PostDeleteUseCase.php',
    124127    'AppfulPlugin\\UseCases\\PostSaveUseCase' => $baseDir . '/../includes/use_cases/PostSaveUseCase.php',
     128    'AppfulPlugin\\UseCases\\PullLocalPostContentUseCase' => $baseDir . '/../includes/use_cases/PullLocalPostContentUseCase.php',
    125129    'AppfulPlugin\\UseCases\\RegisterBlogUseCase' => $baseDir . '/../includes/use_cases/RegisterBlogUseCase.php',
    126130    'AppfulPlugin\\UseCases\\SendAttachmentChunkSyncUseCase' => $baseDir . '/../includes/use_cases/SendAttachmentChunkSyncUseCase.php',
  • appful-app/tags/3.1.0/lib/vendor/composer/autoload_static.php

    r2920030 r2920184  
    176176        'AppfulPlugin\\Api\\Api' => __DIR__ . '/../..' . '/../includes/api/Api.php',
    177177        'AppfulPlugin\\Api\\Client\\BackendClient' => __DIR__ . '/../..' . '/../includes/api/client/BackendClient.php',
     178        'AppfulPlugin\\Api\\Client\\SelfClient' => __DIR__ . '/../..' . '/../includes/api/client/SelfClient.php',
    178179        'AppfulPlugin\\Api\\Dtos\\AttachmentDto' => __DIR__ . '/../..' . '/../includes/api/dtos/AttachmentDto.php',
    179180        'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogHooksDto.php',
     
    206207        'AppfulPlugin\\Api\\Handlers\\LogRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/LogRequestHandler.php',
    207208        'AppfulPlugin\\Api\\Handlers\\PostSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/PostSyncRequestHandler.php',
     209        'AppfulPlugin\\Api\\Handlers\\PullLocalPostContentRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/PullLocalPostContentRequestHandler.php',
    208210        'AppfulPlugin\\Api\\Handlers\\RequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RequestHandler.php',
    209211        'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SyncRequestHandler.php',
     
    222224        'AppfulPlugin\\Api\\Mapper\\UserMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/UserMapper.php',
    223225        'AppfulPlugin\\Api\\ReqHandler' => __DIR__ . '/../..' . '/../includes/api/ReqHandler.php',
    224         'AppfulPlugin\\Api\\Requests\\BackendRequest' => __DIR__ . '/../..' . '/../includes/api/requests/BackendRequest.php',
     226        'AppfulPlugin\\Api\\Requests\\HttpRequest' => __DIR__ . '/../..' . '/../includes/api/requests/HttpRequest.php',
    225227        'AppfulPlugin\\Api\\Requests\\PluginRequest' => __DIR__ . '/../..' . '/../includes/api/requests/PluginRequest.php',
    226         'AppfulPlugin\\Api\\Responses\\BackendResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/BackendResponse.php',
     228        'AppfulPlugin\\Api\\Responses\\HttpResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/HttpResponse.php',
    227229        'AppfulPlugin\\Api\\Responses\\PluginResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/PluginResponse.php',
    228230        'AppfulPlugin\\Api\\Rewrites' => __DIR__ . '/../..' . '/../includes/api/Rewrites.php',
     
    278280        'AppfulPlugin\\UseCases\\GetCommentSyncDataUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetCommentSyncDataUseCase.php',
    279281        'AppfulPlugin\\UseCases\\GetCommentsByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetCommentsByIdUseCase.php',
     282        'AppfulPlugin\\UseCases\\GetLocalPostContentByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetLocalPostContentByIdUseCase.php',
    280283        'AppfulPlugin\\UseCases\\GetLogsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetLogsUseCase.php',
    281284        'AppfulPlugin\\UseCases\\GetPostContentsByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetPostContentsByIdUseCase.php',
     
    290293        'AppfulPlugin\\UseCases\\PostDeleteUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostDeleteUseCase.php',
    291294        'AppfulPlugin\\UseCases\\PostSaveUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostSaveUseCase.php',
     295        'AppfulPlugin\\UseCases\\PullLocalPostContentUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PullLocalPostContentUseCase.php',
    292296        'AppfulPlugin\\UseCases\\RegisterBlogUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/RegisterBlogUseCase.php',
    293297        'AppfulPlugin\\UseCases\\SendAttachmentChunkSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/SendAttachmentChunkSyncUseCase.php',
  • appful-app/tags/3.1.0/readme.txt

    r2920030 r2920184  
    66Tested up to: 6.2
    77Requires PHP: 7.4
    8 Stable tag: 3.0.0
     8Stable tag: 3.1.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • appful-app/trunk/appful-app.php

    r2920030 r2920184  
    1212 * Plugin URI:        https://appful.io
    1313 * Description:       Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes.
    14  * Version:           3.0.0
     14 * Version:           3.1.0
    1515 * Requires at least: 5.8
    1616 * Requires PHP:      7.4
  • appful-app/trunk/includes/api/Endpoints.php

    r2920030 r2920184  
    2222    public static string $GET_POSTS = "get-post";
    2323    public static string $GET_POST_CONTENTS = "get-post-content";
     24    public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local";
    2425    public static string $GET_USERS = "get-user";
    2526    public static string $GET_TAGS = "get-tag";
     
    2930
    3031
    31     public static string $HOOK = "/appful/api/";
     32    public static string $HOOK = "/appful/api";
    3233    public static string $CREATE_COMMENT = "create-comment";
    3334    public static string $AUTHENTICATE_USER = "authenticate-user";
  • appful-app/trunk/includes/api/ReqHandler.php

    r2920030 r2920184  
    2020use AppfulPlugin\Api\Handlers\LogRequestHandler;
    2121use AppfulPlugin\Api\Handlers\PostSyncRequestHandler;
     22use AppfulPlugin\Api\Handlers\PullLocalPostContentRequestHandler;
    2223use AppfulPlugin\Api\Handlers\RequestHandler;
    2324use AppfulPlugin\Api\Handlers\SyncRequestHandler;
     
    5455            new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ),
    5556            new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ),
     57            new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ),
    5658        ];
    5759    }
  • appful-app/trunk/includes/api/client/BackendClient.php

    r2907312 r2920184  
    33namespace AppfulPlugin\Api\Client;
    44
    5 use AppfulPlugin\Api\Requests\BackendRequest;
    6 use AppfulPlugin\Api\Responses\BackendResponse;
     5use AppfulPlugin\Api\Requests\HttpRequest;
     6use AppfulPlugin\Api\Responses\HttpResponse;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    2525    }
    2626
    27     public function send_request( BackendRequest $backend_request ): BackendResponse {
     27    public function send_request( HttpRequest $backend_request ): HttpResponse {
    2828        try {
    2929            if ( ! $backend_request->has_header( "Authorization" ) ) {
     
    4242            }
    4343
    44             return BackendResponse::backend_response()->body( json_decode( $response->getBody(), true ) )->status( $response->getStatusCode() );
     44            return HttpResponse::backend_response()->body( json_decode( $response->getBody(), true ) )->status( $response->getStatusCode() );
    4545        } catch ( GuzzleException $e ) {
    4646            Logger::log( "Error happened when trying to execute backend request: " . $e->getMessage() );
    4747
    48             return BackendResponse::backend_response()->status( 500 );
     48            return HttpResponse::backend_response()->status( 500 );
    4949        }
    5050    }
  • appful-app/trunk/includes/helper/Constants.php

    r2920030 r2920184  
    3535    public static string $API_VERSION_1 = "/v1";
    3636
    37     public static int $POST_SYNC_CHUNK_SIZE = 200;
     37    public static int $POST_SYNC_CHUNK_SIZE = 70;
    3838    public static int $COMMENT_SYNC_CHUNK_SIZE = 100;
    3939    public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 200;
  • appful-app/trunk/includes/main/AppfulPlugin.php

    r2920030 r2920184  
    55use AppfulPlugin\Api\Api;
    66use AppfulPlugin\Api\Client\BackendClient;
     7use AppfulPlugin\Api\Client\SelfClient;
    78use AppfulPlugin\Api\ReqHandler;
    89use AppfulPlugin\Api\Rewrites;
     
    2728        $rewrites               = new Rewrites();
    2829        $backend_client         = new BackendClient();
    29         $this->use_case_manager = new UseCaseManager( $backend_client );
     30        $self_client            = new SelfClient();
     31        $this->use_case_manager = new UseCaseManager( $backend_client, $self_client );
    3032        $api_request_handler    = new ReqHandler( $this->use_case_manager );
    3133
  • appful-app/trunk/includes/use_cases/AttachmentDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $attachment_id ) {
    1818        Logger::log( "Sending attachment delete request for: " . $attachment_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$ATTACHMENT_PATH . "/" . $attachment_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$ATTACHMENT_PATH . "/" . $attachment_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/AttachmentSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\AttachmentMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Attachment;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $attachment_dto = AttachmentMapper::to_dto( $attachment );
    2121        Logger::log( "Sending attachment save request with data: " . json_encode( $attachment_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $attachment_dto )->path( Constants::$ATTACHMENT_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $attachment_dto )->path( Constants::$ATTACHMENT_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/use_cases/CategoryDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $term_id ) {
    1818        Logger::log( "Sending category delete request for: " . $term_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/categories/" . $term_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/categories/" . $term_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/CategorySaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\CategoryMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Category;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $category_dto = CategoryMapper::to_dto( $category );
    2121        Logger::log( "Sending category save request with data: " . json_encode( $category_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $category_dto )->path( Constants::$TAXONOMY_PATH . "/categories" );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $category_dto )->path( Constants::$TAXONOMY_PATH . "/categories" );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/use_cases/CommentDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $comment_id ) {
    1818        Logger::log( "Sending comment delete request for: " . $comment_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$COMMENT_PATH . "/" . $comment_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$COMMENT_PATH . "/" . $comment_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/CommentSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\CommentMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Comment;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $comment_dto = CommentMapper::to_dto( $comment );
    2121        Logger::log( "Sending comment save request with data: " . json_encode( $comment_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $comment_dto )->path( Constants::$COMMENT_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $comment_dto )->path( Constants::$COMMENT_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/use_cases/DeleteSessionUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1818    public function invoke() {
    1919        Logger::log("Unregistering blog!");
    20         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$BLOG_PATH );
     20        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$BLOG_PATH );
    2121        $this->backend_client->send_request( $request );
    2222    }
  • appful-app/trunk/includes/use_cases/GetPostContentsByIdUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Domain\PostContent;
    6 use AppfulPlugin\Wp\WPPostManager;
    76
    87class GetPostContentsByIdUseCase {
     8    private PullLocalPostContentUseCase $pull_local_post_content_use_case;
     9
     10    public function __construct( PullLocalPostContentUseCase $pull_local_post_content_use_case ) {
     11        $this->pull_local_post_content_use_case = $pull_local_post_content_use_case;
     12    }
     13
     14
    915    /**
    1016     * @param int[] $ids
     
    1319     */
    1420    public function invoke( array $ids ): array {
    15         return WPPostManager::get_post_contents_by_id( $ids );
     21        $post_contents = [];
     22
     23        foreach ( $ids as $post_id ) {
     24            $response = $this->pull_local_post_content_use_case->invoke( $post_id );
     25            if ( $response != null ) {
     26                $post_contents[] = $response;
     27            }
     28        }
     29
     30        return $post_contents;
    1631    }
    1732}
  • appful-app/trunk/includes/use_cases/LogoutUserUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke() {
    1818        Logger::log( "Logout user!" );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$APPFUL_USER_PATH . "/logout" );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$APPFUL_USER_PATH . "/logout" );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/PostDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $post_id ) {
    1818        Logger::log( "Sending post delete request for: " . $post_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$POST_PATH . "/" . $post_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$POST_PATH . "/" . $post_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/PostSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\PostMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Post;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $post_dto = PostMapper::to_dto( $post );
    2121        Logger::log( "Sending post save request with data: " . json_encode( $post_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $post_dto )->path( Constants::$POST_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $post_dto )->path( Constants::$POST_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/use_cases/RegisterBlogUseCase.php

    r2920030 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\BlogInfoMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Helper\Constants;
    99use AppfulPlugin\Helper\Logger;
     
    2222        $blog_info_dto = BlogInfoMapper::to_dto( $blog_info );
    2323        Logger::log( "Registering blog with data: " . json_encode( $blog_info_dto ) );
    24         $request = BackendRequest::backend_request()->method( "POST" )->body( $blog_info_dto )->path( Constants::$BLOG_PATH );
     24        $request = HttpRequest::backend_request()->method( "POST" )->body( $blog_info_dto )->path( Constants::$BLOG_PATH );
    2525        $body    = $this->backend_client->send_request( $request )->get_body();
    2626        if ( $body != null && isset( $body['blog_id'] ) ) {
  • appful-app/trunk/includes/use_cases/SendAttachmentChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending attachment chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$ATTACHMENT_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$ATTACHMENT_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/trunk/includes/use_cases/SendCategoryChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending category chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/categories/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/categories/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/trunk/includes/use_cases/SendCommentChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending comment chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$COMMENT_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$COMMENT_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/trunk/includes/use_cases/SendPostChunkSyncUseCase.php

    r2907312 r2920184  
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    77use AppfulPlugin\Api\Mapper\SyncItemMapper;
    8 use AppfulPlugin\Api\Requests\BackendRequest;
     8use AppfulPlugin\Api\Requests\HttpRequest;
    99use AppfulPlugin\Domain\SyncChunk;
    1010use AppfulPlugin\Domain\SyncItem;
     
    2323
    2424        Logger::log( "Sending post chunk to sync: " . json_encode( $sync_item_dtos ) );
    25         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$POST_PATH . "/sync" );
     25        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$POST_PATH . "/sync" );
    2626        $this->backend_client->send_request( $request );
    2727    }
  • appful-app/trunk/includes/use_cases/SendTagChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending tag chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/tags/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$TAXONOMY_PATH . "/tags/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/trunk/includes/use_cases/SendUserChunkSyncUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\SyncChunkMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\SyncChunk;
    99use AppfulPlugin\Helper\Constants;
     
    2121
    2222        Logger::log( "Sending user chunk to sync: " . json_encode( $sync_item_dtos ) );
    23         $request = BackendRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$USER_PATH . "/sync" );
     23        $request = HttpRequest::backend_request()->method( "PATCH" )->body( $sync_item_dtos )->path( Constants::$USER_PATH . "/sync" );
    2424        $this->backend_client->send_request( $request );
    2525    }
  • appful-app/trunk/includes/use_cases/TagDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( int $term_id ) {
    1818        Logger::log( "Sending tag delete request for: " . $term_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/tags/" . $term_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$TAXONOMY_PATH . "/tags/" . $term_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/TagSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\TagMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\Tag;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $tag_dto = TagMapper::to_dto( $tag );
    2121        Logger::log( "Sending tag save request with data: " . json_encode( $tag_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $tag_dto )->path( Constants::$TAXONOMY_PATH . "/tags" );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $tag_dto )->path( Constants::$TAXONOMY_PATH . "/tags" );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/use_cases/UseCaseManager.php

    r2920030 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
     6use AppfulPlugin\Api\Client\SelfClient;
    67
    78class UseCaseManager {
     
    5455    private ClearLogsUseCase $clear_logs_use_case;
    5556    private AuthenticateUserUseCase $authenticate_user_use_case;
    56 
    57     public function __construct( BackendClient $backend_client ) {
     57    private PullLocalPostContentUseCase $pull_local_post_content_use_case;
     58    private GetLocalPostContentByIdUseCase $get_local_post_content_by_id_use_case;
     59
     60    public function __construct( BackendClient $backend_client, SelfClient $self_client ) {
    5861        $this->get_android_asset_link_use_case         = new GetAndroidAssetLinkUseCase();
    5962        $this->get_apple_app_site_association_use_case = new GetAppleAppSiteAssociationUseCase();
     
    101104        $this->user_delete_use_case                    = new UserDeleteUseCase( $backend_client );
    102105        $this->user_save_use_case                      = new UserSaveUseCase( $backend_client );
    103         $this->get_post_contents_by_id_use_case        = new GetPostContentsByIdUseCase();
    104106        $this->clear_logs_use_case                     = new ClearLogsUseCase();
    105107        $this->authenticate_user_use_case              = new AuthenticateUserUseCase();
     108        $this->pull_local_post_content_use_case        = new PullLocalPostContentUseCase( $self_client );
     109        $this->get_local_post_content_by_id_use_case   = new GetLocalPostContentByIdUseCase();
     110        $this->get_post_contents_by_id_use_case        = new GetPostContentsByIdUseCase( $this->pull_local_post_content_use_case );
    106111    }
    107112
     
    297302        return $this->authenticate_user_use_case;
    298303    }
     304
     305    public function get_pull_local_post_content_use_case(): PullLocalPostContentUseCase {
     306        return $this->pull_local_post_content_use_case;
     307    }
     308
     309    public function get_get_local_post_content_by_id_use_case(): GetLocalPostContentByIdUseCase {
     310        return $this->get_local_post_content_by_id_use_case;
     311    }
    299312}
  • appful-app/trunk/includes/use_cases/UserDeleteUseCase.php

    r2907312 r2920184  
    44
    55use AppfulPlugin\Api\Client\BackendClient;
    6 use AppfulPlugin\Api\Requests\BackendRequest;
     6use AppfulPlugin\Api\Requests\HttpRequest;
    77use AppfulPlugin\Helper\Constants;
    88use AppfulPlugin\Helper\Logger;
     
    1717    public function invoke( string $user_id ) {
    1818        Logger::log( "Sending user delete request for: " . $user_id );
    19         $request = BackendRequest::backend_request()->method( "DELETE" )->path( Constants::$USER_PATH . "/" . $user_id );
     19        $request = HttpRequest::backend_request()->method( "DELETE" )->path( Constants::$USER_PATH . "/" . $user_id );
    2020        $this->backend_client->send_request( $request );
    2121    }
  • appful-app/trunk/includes/use_cases/UserSaveUseCase.php

    r2907312 r2920184  
    55use AppfulPlugin\Api\Client\BackendClient;
    66use AppfulPlugin\Api\Mapper\UserMapper;
    7 use AppfulPlugin\Api\Requests\BackendRequest;
     7use AppfulPlugin\Api\Requests\HttpRequest;
    88use AppfulPlugin\Domain\User;
    99use AppfulPlugin\Helper\Constants;
     
    2020        $user_dto = UserMapper::to_dto( $user );
    2121        Logger::log( "Sending user save request with data: " . json_encode( $user_dto ) );
    22         $request = BackendRequest::backend_request()->method( "POST" )->body( $user_dto )->path( Constants::$USER_PATH );
     22        $request = HttpRequest::backend_request()->method( "POST" )->body( $user_dto )->path( Constants::$USER_PATH );
    2323        $this->backend_client->send_request( $request );
    2424    }
  • appful-app/trunk/includes/wp/WPBlogManager.php

    r2920030 r2920184  
    2121    private static function get_hooks(): BlogHooks {
    2222        return BlogHooks::blog_hooks()
    23                         ->create_comment( self::get_site_url() . Endpoints::$HOOK . Endpoints::$CREATE_COMMENT )
    24                         ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . Endpoints::$AUTHENTICATE_USER );
     23                        ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT )
     24                        ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER );
    2525    }
    2626
  • appful-app/trunk/includes/wp/WPPostManager.php

    r2907312 r2920184  
    8686    }
    8787
    88     /**
    89      * @param int[] $ids
    90      *
    91      * @return PostContent[]
    92      */
    93     public static function get_post_contents_by_id( array $ids ): array {
    94         return self::pullPostByIds( $ids );
    95     }
    96 
    97     /**
    98      * @param int[] $ids
    99      *
    100      * @return PostContent[]
    101      */
    102     private static function pullPostByIds( array $ids ): array {
     88    public static function get_post_content_by_id( int $id ): ?PostContent {
    10389        global $wp_query;
    104 
    105         $postContents = [];
    10690
    10791        do_action( 'template_redirect' );
    10892
    109         foreach ( $ids as $post_id ) {
    110             $args = [
    111                 "posts_per_page" => 1,
    112                 "post_type"      => "post",
    113                 "p"              => $post_id,
    114                 "post_status"    => self::get_allowed_post_stati()
    115             ];
     93        $args = [
     94            "posts_per_page" => 1,
     95            "post_type"      => "post",
     96            "p"              => $id,
     97            "post_status"    => self::get_allowed_post_stati()
     98        ];
    11699
    117             $wp_query = new \WP_Query( $args );
    118             while ( have_posts() ) {
    119                 the_post();
     100        $wp_query = new \WP_Query( $args );
     101        if ( have_posts() ) {
     102            the_post();
    120103
    121                 ob_start();
    122                 wp_head();
    123                 $head = ob_get_clean();
     104            ob_start();
     105            wp_head();
     106            $head = ob_get_clean();
    124107
    125                 ob_start();
    126                 the_content();
    127                 $content = ob_get_clean();
     108            ob_start();
     109            the_content();
     110            $content = ob_get_clean();
    128111
    129                 ob_start();
    130                 wp_footer();
    131                 $footer = ob_get_clean();
     112            ob_start();
     113            wp_footer();
     114            $footer = ob_get_clean();
    132115
    133                 ob_start();
    134                 body_class();
    135                 $body_class = ob_get_clean();
    136 
    137                 $postContents[] = PostContent::postContent()
    138                                              ->id( get_the_ID() )
    139                                              ->content( $content )
    140                                              ->head( $head )
    141                                              ->footer( $footer )
    142                                              ->body_class( $body_class );
    143             }
     116            ob_start();
     117            body_class();
     118            $body_class = ob_get_clean();
    144119
    145120            wp_reset_postdata();
     121
     122            return PostContent::postContent()
     123                              ->id( get_the_ID() )
     124                              ->content( $content )
     125                              ->head( $head )
     126                              ->footer( $footer )
     127                              ->body_class( $body_class );
    146128        }
    147129
    148         return $postContents;
     130        return null;
    149131    }
    150132
  • appful-app/trunk/lib/vendor/composer/autoload_classmap.php

    r2920030 r2920184  
    99    'AppfulPlugin\\Api\\Api' => $baseDir . '/../includes/api/Api.php',
    1010    'AppfulPlugin\\Api\\Client\\BackendClient' => $baseDir . '/../includes/api/client/BackendClient.php',
     11    'AppfulPlugin\\Api\\Client\\SelfClient' => $baseDir . '/../includes/api/client/SelfClient.php',
    1112    'AppfulPlugin\\Api\\Dtos\\AttachmentDto' => $baseDir . '/../includes/api/dtos/AttachmentDto.php',
    1213    'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => $baseDir . '/../includes/api/dtos/BlogHooksDto.php',
     
    3940    'AppfulPlugin\\Api\\Handlers\\LogRequestHandler' => $baseDir . '/../includes/api/handlers/LogRequestHandler.php',
    4041    'AppfulPlugin\\Api\\Handlers\\PostSyncRequestHandler' => $baseDir . '/../includes/api/handlers/PostSyncRequestHandler.php',
     42    'AppfulPlugin\\Api\\Handlers\\PullLocalPostContentRequestHandler' => $baseDir . '/../includes/api/handlers/PullLocalPostContentRequestHandler.php',
    4143    'AppfulPlugin\\Api\\Handlers\\RequestHandler' => $baseDir . '/../includes/api/handlers/RequestHandler.php',
    4244    'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => $baseDir . '/../includes/api/handlers/SyncRequestHandler.php',
     
    5557    'AppfulPlugin\\Api\\Mapper\\UserMapper' => $baseDir . '/../includes/api/mapper/UserMapper.php',
    5658    'AppfulPlugin\\Api\\ReqHandler' => $baseDir . '/../includes/api/ReqHandler.php',
    57     'AppfulPlugin\\Api\\Requests\\BackendRequest' => $baseDir . '/../includes/api/requests/BackendRequest.php',
     59    'AppfulPlugin\\Api\\Requests\\HttpRequest' => $baseDir . '/../includes/api/requests/HttpRequest.php',
    5860    'AppfulPlugin\\Api\\Requests\\PluginRequest' => $baseDir . '/../includes/api/requests/PluginRequest.php',
    59     'AppfulPlugin\\Api\\Responses\\BackendResponse' => $baseDir . '/../includes/api/reponses/BackendResponse.php',
     61    'AppfulPlugin\\Api\\Responses\\HttpResponse' => $baseDir . '/../includes/api/reponses/HttpResponse.php',
    6062    'AppfulPlugin\\Api\\Responses\\PluginResponse' => $baseDir . '/../includes/api/reponses/PluginResponse.php',
    6163    'AppfulPlugin\\Api\\Rewrites' => $baseDir . '/../includes/api/Rewrites.php',
     
    111113    'AppfulPlugin\\UseCases\\GetCommentSyncDataUseCase' => $baseDir . '/../includes/use_cases/GetCommentSyncDataUseCase.php',
    112114    'AppfulPlugin\\UseCases\\GetCommentsByIdUseCase' => $baseDir . '/../includes/use_cases/GetCommentsByIdUseCase.php',
     115    'AppfulPlugin\\UseCases\\GetLocalPostContentByIdUseCase' => $baseDir . '/../includes/use_cases/GetLocalPostContentByIdUseCase.php',
    113116    'AppfulPlugin\\UseCases\\GetLogsUseCase' => $baseDir . '/../includes/use_cases/GetLogsUseCase.php',
    114117    'AppfulPlugin\\UseCases\\GetPostContentsByIdUseCase' => $baseDir . '/../includes/use_cases/GetPostContentsByIdUseCase.php',
     
    123126    'AppfulPlugin\\UseCases\\PostDeleteUseCase' => $baseDir . '/../includes/use_cases/PostDeleteUseCase.php',
    124127    'AppfulPlugin\\UseCases\\PostSaveUseCase' => $baseDir . '/../includes/use_cases/PostSaveUseCase.php',
     128    'AppfulPlugin\\UseCases\\PullLocalPostContentUseCase' => $baseDir . '/../includes/use_cases/PullLocalPostContentUseCase.php',
    125129    'AppfulPlugin\\UseCases\\RegisterBlogUseCase' => $baseDir . '/../includes/use_cases/RegisterBlogUseCase.php',
    126130    'AppfulPlugin\\UseCases\\SendAttachmentChunkSyncUseCase' => $baseDir . '/../includes/use_cases/SendAttachmentChunkSyncUseCase.php',
  • appful-app/trunk/lib/vendor/composer/autoload_static.php

    r2920030 r2920184  
    176176        'AppfulPlugin\\Api\\Api' => __DIR__ . '/../..' . '/../includes/api/Api.php',
    177177        'AppfulPlugin\\Api\\Client\\BackendClient' => __DIR__ . '/../..' . '/../includes/api/client/BackendClient.php',
     178        'AppfulPlugin\\Api\\Client\\SelfClient' => __DIR__ . '/../..' . '/../includes/api/client/SelfClient.php',
    178179        'AppfulPlugin\\Api\\Dtos\\AttachmentDto' => __DIR__ . '/../..' . '/../includes/api/dtos/AttachmentDto.php',
    179180        'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogHooksDto.php',
     
    206207        'AppfulPlugin\\Api\\Handlers\\LogRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/LogRequestHandler.php',
    207208        'AppfulPlugin\\Api\\Handlers\\PostSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/PostSyncRequestHandler.php',
     209        'AppfulPlugin\\Api\\Handlers\\PullLocalPostContentRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/PullLocalPostContentRequestHandler.php',
    208210        'AppfulPlugin\\Api\\Handlers\\RequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RequestHandler.php',
    209211        'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SyncRequestHandler.php',
     
    222224        'AppfulPlugin\\Api\\Mapper\\UserMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/UserMapper.php',
    223225        'AppfulPlugin\\Api\\ReqHandler' => __DIR__ . '/../..' . '/../includes/api/ReqHandler.php',
    224         'AppfulPlugin\\Api\\Requests\\BackendRequest' => __DIR__ . '/../..' . '/../includes/api/requests/BackendRequest.php',
     226        'AppfulPlugin\\Api\\Requests\\HttpRequest' => __DIR__ . '/../..' . '/../includes/api/requests/HttpRequest.php',
    225227        'AppfulPlugin\\Api\\Requests\\PluginRequest' => __DIR__ . '/../..' . '/../includes/api/requests/PluginRequest.php',
    226         'AppfulPlugin\\Api\\Responses\\BackendResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/BackendResponse.php',
     228        'AppfulPlugin\\Api\\Responses\\HttpResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/HttpResponse.php',
    227229        'AppfulPlugin\\Api\\Responses\\PluginResponse' => __DIR__ . '/../..' . '/../includes/api/reponses/PluginResponse.php',
    228230        'AppfulPlugin\\Api\\Rewrites' => __DIR__ . '/../..' . '/../includes/api/Rewrites.php',
     
    278280        'AppfulPlugin\\UseCases\\GetCommentSyncDataUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetCommentSyncDataUseCase.php',
    279281        'AppfulPlugin\\UseCases\\GetCommentsByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetCommentsByIdUseCase.php',
     282        'AppfulPlugin\\UseCases\\GetLocalPostContentByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetLocalPostContentByIdUseCase.php',
    280283        'AppfulPlugin\\UseCases\\GetLogsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetLogsUseCase.php',
    281284        'AppfulPlugin\\UseCases\\GetPostContentsByIdUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/GetPostContentsByIdUseCase.php',
     
    290293        'AppfulPlugin\\UseCases\\PostDeleteUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostDeleteUseCase.php',
    291294        'AppfulPlugin\\UseCases\\PostSaveUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostSaveUseCase.php',
     295        'AppfulPlugin\\UseCases\\PullLocalPostContentUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PullLocalPostContentUseCase.php',
    292296        'AppfulPlugin\\UseCases\\RegisterBlogUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/RegisterBlogUseCase.php',
    293297        'AppfulPlugin\\UseCases\\SendAttachmentChunkSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/SendAttachmentChunkSyncUseCase.php',
  • appful-app/trunk/readme.txt

    r2920030 r2920184  
    66Tested up to: 6.2
    77Requires PHP: 7.4
    8 Stable tag: 3.0.0
     8Stable tag: 3.1.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.