<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmet Kaptan</title>
    <description>The latest articles on DEV Community by Ahmet Kaptan (@codescaptain).</description>
    <link>https://dev.to/codescaptain</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F735484%2F374de40f-152c-48f1-b26b-d6404c76899e.jpeg</url>
      <title>DEV Community: Ahmet Kaptan</title>
      <link>https://dev.to/codescaptain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codescaptain"/>
    <language>en</language>
    <item>
      <title>How do you add Medium or Dev.to articles to your GitHub Profile?</title>
      <dc:creator>Ahmet Kaptan</dc:creator>
      <pubDate>Wed, 20 Dec 2023 21:23:36 +0000</pubDate>
      <link>https://dev.to/codescaptain/how-do-you-add-medium-or-devto-articles-to-your-github-profile-32bk</link>
      <guid>https://dev.to/codescaptain/how-do-you-add-medium-or-devto-articles-to-your-github-profile-32bk</guid>
      <description>&lt;p&gt;Hello folks, 2 days ago, I asked myself, “How can I add Medium articles to my GitHub Profile?” So I googled it and found some articles. I read them, and the articles provided some repositories, but the projects are outdated and don’t work. I decided to create an open-source project for this. We can call an API to get an article as a responsive SVG and showcase it on our GitHub profiles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/codescaptain/rails-medium-snippet"&gt;The Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The source of Medium and Dev.to articles&lt;br&gt;
I use the API:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://api.rss2json.com/v1/api.json?rss_url=https://medium.com/feed/#{@the_medium_username}")&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;code&gt;https://api.rss2json.com/v1/api.json?rss_url=https://dev.to/feed/#{@the_medium_username}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The API gives the user’s &lt;strong&gt;latest 10 articles&lt;/strong&gt;. So that is it. We already have data.&lt;/p&gt;
&lt;h3&gt;
  
  
  Medium Snippet API
&lt;/h3&gt;

&lt;p&gt;I have been using Ruby on Rails in the project. The Medium Snippet API allows users to retrieve and display the latest 10 &lt;strong&gt;Medium&lt;/strong&gt; or &lt;strong&gt;Dev.to&lt;/strong&gt; articles for a given username. Users can add these articles to their GitHub profiles by providing the username and index parameters.&lt;/p&gt;

&lt;p&gt;I am currently maintaining it and there are to-dos.&lt;br&gt;
Like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update snippet card style&lt;/li&gt;
&lt;li&gt;Add a new style for white mode theme&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The API finds articles from the username with this link:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;https://medium-snippet-dc633c4f39a0.herokuapp.com/api/article.svg?username=@codescaptain&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;index=0&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;source=medium

https://medium-snippet-dc633c4f39a0.herokuapp.com/api/article.svg?username=@codescaptain&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;index=0&lt;span class="err"&gt;&amp;amp;&lt;/span&gt;source=dev_to
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;username: your &lt;strong&gt;medium&lt;/strong&gt; or &lt;strong&gt;dev.to&lt;/strong&gt; username/profile&lt;/li&gt;
&lt;li&gt;index: your recent article index. e.g.: 0 means your latest article.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Medium
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[![My Medium story](@codescaptain&amp;amp;index=1)](#)"&amp;gt;https://medium-snippet-dc633c4f39a0.herokuapp.com/api/article.svg?username=@codescaptain&amp;amp;index=1)](#)
[![My Medium story](@codescaptain&amp;amp;index=0)](#)"&amp;gt;https://medium-snippet-dc633c4f39a0.herokuapp.com/api/article.svg?username=@codescaptain&amp;amp;index=0)](#)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Output(the article has been changing depending index):
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x24dU_C2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szxr3eblm4up6c79m10o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x24dU_C2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szxr3eblm4up6c79m10o.png" alt="Image description" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Contact&lt;br&gt;
For inquiries, you can reach out through my &lt;a href="https://github.com/codescaptain"&gt;GitHub Profile&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
