PostypeRails can help you automate when you post in your Postype Blog.
gem 'postype_rails', '~> 0.1.0'
- When you enter the screen where you write a new post, That screen's url show your blog_id (The yellow part of the picture)
![How To Find Your Postype Blog IDd](https://private-user-images.githubusercontent.com/63589031/283176868-97ee6a20-a672-4113-91d0-040d051103fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzkyNjQsIm5iZiI6MTcyNTA3ODk2NCwicGF0aCI6Ii82MzU4OTAzMS8yODMxNzY4NjgtOTdlZTZhMjAtYTY3Mi00MTEzLTkxZDAtMDQwZDA1MTEwM2ZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA0MzYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY4ZjY5OWNlNmFkNjkwM2Q5ZTY1YTgzNzkyZTUzZThhZWQ3YjMyMTA5MDI2NTQ4MDM5MjI2YzY4N2VjZTI2ZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YM2rOZkp2kmDUQp3GXtuRGO1T6gqixNEftlFPdZ6R4A)
- I use Chrome, and I'll explain it to you based on that.
- Open The DevTool And Let's Go to Network Tab
![Let's open Network Tab](https://private-user-images.githubusercontent.com/63589031/283177735-d59fb7b7-890c-40c0-81d0-4de16206a350.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzkyNjQsIm5iZiI6MTcyNTA3ODk2NCwicGF0aCI6Ii82MzU4OTAzMS8yODMxNzc3MzUtZDU5ZmI3YjctODkwYy00MGMwLTgxZDAtNGRlMTYyMDZhMzUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA0MzYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkZGNhZWQ2MThiNDg2YTZjMDY1NzZlNmViZmE2OWE4OWI0ZmQzZDkyODhhYzk2Mzk4ZWEzZWY4NmM5ZjU4MTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.T97LhfestHswmM2WUbhgGODbymFhlgdDRNsYau1Sf8o)
- Then Select "Doc"
![Select Doc](https://private-user-images.githubusercontent.com/63589031/283178207-ed57e617-b9de-4ad3-a48a-0e75433d4b37.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzkyNjQsIm5iZiI6MTcyNTA3ODk2NCwicGF0aCI6Ii82MzU4OTAzMS8yODMxNzgyMDctZWQ1N2U2MTctYjlkZS00YWQzLWE0OGEtMGU3NTQzM2Q0YjM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA0MzYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmMjU4NjJiZGU1OWZhYzYwZDE4NmFkYWY5YWFlZDgwZDEyNGExZTI4NzZjNjM3YWZiODEwOTM1M2NiMzVhMmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.AnYFpruhj4rCud2AryAXXIO0Uh7QRHpLPUYYsoP2t4g)
- Without closing the DevTool, ReEnter The Screen where you write a new post
![Click This](https://private-user-images.githubusercontent.com/63589031/283178873-4fa3206d-ce42-4c27-b47e-af03b0bdca73.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzkyNjQsIm5iZiI6MTcyNTA3ODk2NCwicGF0aCI6Ii82MzU4OTAzMS8yODMxNzg4NzMtNGZhMzIwNmQtY2U0Mi00YzI3LWI0N2UtYWYwM2IwYmRjYTczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA0MzYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWExOTlhNzM1OTE1OTljZjk2OWM2ZWEzNmMyNGFlOTNkZGYzODM2MTQ2NmVmOTE3MjY1NTA1MjJhOTg0ZGNhZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Jujupckl3rbABTfq5ia9PxPvFZeBi8dj1mm5Iz5TOw0)
- Click the First Request, You Can Find The Cookie In Request Headers (The yellow part of the picture)
![You Can Find Your Cookie](https://private-user-images.githubusercontent.com/63589031/283180053-bcd58dca-1f74-460f-bb6b-ca1f923c3f31.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNzkyNjQsIm5iZiI6MTcyNTA3ODk2NCwicGF0aCI6Ii82MzU4OTAzMS8yODMxODAwNTMtYmNkNThkY2EtMWY3NC00NjBmLWJiNmItY2ExZjkyM2MzZjMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA0MzYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNjg0N2JiNWY4NTgxMTY0MzYzYjliNDE0MDdmNGEzOWE1NzhkZmNmYmZiYTg3ZDNiYjA5NzEyZTA5NzdlZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.M6l5sQWXdMqCBkL0RDP57EPXp5qUBosZK85V29ua-6E)
require 'postype_rails'
PostypeRails.upload("postype cookie", "blog id", "my post title", "<p>my post content</p>")
You should Pass Arguments.
- cookie: (String)
- blog_id: (String)
- title: (String)
- content: (String) (content should be html string)